diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 64824df..7017517 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -13,10 +13,11 @@
import type { dictType } from '@/global'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $route = useRoute()
const $router = useRouter()
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -27,6 +28,23 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-person', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-person') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 64824df..7017517 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -13,10 +13,11 @@
import type { dictType } from '@/global'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $route = useRoute()
const $router = useRouter()
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -27,6 +28,23 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-person', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-person') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/price/list.vue b/src/views/measure/price/list.vue
index 094cf2e..69cbdb1 100644
--- a/src/views/measure/price/list.vue
+++ b/src/views/measure/price/list.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import useTemplateDownload from '@/utils/useTemplateDownload'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery = ref({
checkType: '', // 检校类型
@@ -22,6 +23,22 @@
offset: 1, // 页码
limit: 20, // 分页数量
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-price', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-price') || {
+ checkType: '', // 检校类型
+ priceItem: '', // 项目
+ priceName: '', // 价格名称
+ categoryName: '', // 类别名称
+ itemName: '', // 项目名称
+ priceNo: '', // 价格编号
+ priceType: '', // 类别id
+ offset: 1, // 页码
+ limit: 20, // 分页数量
+}
// 表格数据
const list = ref([])
// 总数
@@ -52,9 +69,9 @@
const loadingTable = ref(false)
// 查询列表
const fetchData = (isNowPage = false) => {
- if (!isNowPage) {
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // listQuery.value.offset = 1
+ // }
loadingTable.value = true
getPriceList(listQuery.value).then((response) => {
list.value = response.data.records
@@ -62,7 +79,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 64824df..7017517 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -13,10 +13,11 @@
import type { dictType } from '@/global'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $route = useRoute()
const $router = useRouter()
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -27,6 +28,23 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-person', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-person') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/price/list.vue b/src/views/measure/price/list.vue
index 094cf2e..69cbdb1 100644
--- a/src/views/measure/price/list.vue
+++ b/src/views/measure/price/list.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import useTemplateDownload from '@/utils/useTemplateDownload'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery = ref({
checkType: '', // 检校类型
@@ -22,6 +23,22 @@
offset: 1, // 页码
limit: 20, // 分页数量
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-price', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-price') || {
+ checkType: '', // 检校类型
+ priceItem: '', // 项目
+ priceName: '', // 价格名称
+ categoryName: '', // 类别名称
+ itemName: '', // 项目名称
+ priceNo: '', // 价格编号
+ priceType: '', // 类别id
+ offset: 1, // 页码
+ limit: 20, // 分页数量
+}
// 表格数据
const list = ref([])
// 总数
@@ -52,9 +69,9 @@
const loadingTable = ref(false)
// 查询列表
const fetchData = (isNowPage = false) => {
- if (!isNowPage) {
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // listQuery.value.offset = 1
+ // }
loadingTable.value = true
getPriceList(listQuery.value).then((response) => {
list.value = response.data.records
@@ -62,7 +79,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 9284df6..9560cba 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -10,6 +10,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval, submitApproval } from '@/api/approval'
import type { IAddress } from '@/components/AddressSelect/address-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -50,6 +51,29 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source-list', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source-list') || {
+ approvalStatus: props.status,
+ businessContent: '',
+ companyArea: '', // 区
+ companyCity: '', // 市
+ companyProvince: '', // 省
+ companyCountry: '', // 国家
+ companyAreaName: '', // 区
+ companyCityName: '', // 市
+ companyCountryName: '', // 国家
+ companyProvinceName: '', // 省
+ companyAddress: '',
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ supplierName: '',
+ supplierNo: '',
+ offset: 1,
+ limit: 20,
+}
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
@@ -77,10 +101,10 @@
// 获取数据
const fetchData = (isNowPage: boolean, isReset = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { companyProvinceName: string; companyCityName: string }) => {
return {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 64824df..7017517 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -13,10 +13,11 @@
import type { dictType } from '@/global'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $route = useRoute()
const $router = useRouter()
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -27,6 +28,23 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-person', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-person') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/price/list.vue b/src/views/measure/price/list.vue
index 094cf2e..69cbdb1 100644
--- a/src/views/measure/price/list.vue
+++ b/src/views/measure/price/list.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import useTemplateDownload from '@/utils/useTemplateDownload'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery = ref({
checkType: '', // 检校类型
@@ -22,6 +23,22 @@
offset: 1, // 页码
limit: 20, // 分页数量
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-price', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-price') || {
+ checkType: '', // 检校类型
+ priceItem: '', // 项目
+ priceName: '', // 价格名称
+ categoryName: '', // 类别名称
+ itemName: '', // 项目名称
+ priceNo: '', // 价格编号
+ priceType: '', // 类别id
+ offset: 1, // 页码
+ limit: 20, // 分页数量
+}
// 表格数据
const list = ref([])
// 总数
@@ -52,9 +69,9 @@
const loadingTable = ref(false)
// 查询列表
const fetchData = (isNowPage = false) => {
- if (!isNowPage) {
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // listQuery.value.offset = 1
+ // }
loadingTable.value = true
getPriceList(listQuery.value).then((response) => {
list.value = response.data.records
@@ -62,7 +79,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 9284df6..9560cba 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -10,6 +10,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval, submitApproval } from '@/api/approval'
import type { IAddress } from '@/components/AddressSelect/address-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -50,6 +51,29 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source-list', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source-list') || {
+ approvalStatus: props.status,
+ businessContent: '',
+ companyArea: '', // 区
+ companyCity: '', // 市
+ companyProvince: '', // 省
+ companyCountry: '', // 国家
+ companyAreaName: '', // 区
+ companyCityName: '', // 市
+ companyCountryName: '', // 国家
+ companyProvinceName: '', // 省
+ companyAddress: '',
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ supplierName: '',
+ supplierNo: '',
+ offset: 1,
+ limit: 20,
+}
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
@@ -77,10 +101,10 @@
// 获取数据
const fetchData = (isNowPage: boolean, isReset = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { companyProvinceName: string; companyCityName: string }) => {
return {
diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue
index 39a626b..7efba1b 100644
--- a/src/views/measure/source/list.vue
+++ b/src/views/measure/source/list.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
@@ -20,6 +21,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source') || {
+ supplierNo: '', // 业务内容
+ supplierName: '', // 溯源供方名称
+ businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
// 表格数据
const list = ref([])
const { proxy } = getCurrentInstance() as any
@@ -82,10 +96,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getSoucreList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ISupplier) => {
if (item.companyProvinceName && item.companyCityName) {
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 64824df..7017517 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -13,10 +13,11 @@
import type { dictType } from '@/global'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $route = useRoute()
const $router = useRouter()
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -27,6 +28,23 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-person', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-person') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/price/list.vue b/src/views/measure/price/list.vue
index 094cf2e..69cbdb1 100644
--- a/src/views/measure/price/list.vue
+++ b/src/views/measure/price/list.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import useTemplateDownload from '@/utils/useTemplateDownload'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery = ref({
checkType: '', // 检校类型
@@ -22,6 +23,22 @@
offset: 1, // 页码
limit: 20, // 分页数量
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-price', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-price') || {
+ checkType: '', // 检校类型
+ priceItem: '', // 项目
+ priceName: '', // 价格名称
+ categoryName: '', // 类别名称
+ itemName: '', // 项目名称
+ priceNo: '', // 价格编号
+ priceType: '', // 类别id
+ offset: 1, // 页码
+ limit: 20, // 分页数量
+}
// 表格数据
const list = ref([])
// 总数
@@ -52,9 +69,9 @@
const loadingTable = ref(false)
// 查询列表
const fetchData = (isNowPage = false) => {
- if (!isNowPage) {
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // listQuery.value.offset = 1
+ // }
loadingTable.value = true
getPriceList(listQuery.value).then((response) => {
list.value = response.data.records
@@ -62,7 +79,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 9284df6..9560cba 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -10,6 +10,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval, submitApproval } from '@/api/approval'
import type { IAddress } from '@/components/AddressSelect/address-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -50,6 +51,29 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source-list', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source-list') || {
+ approvalStatus: props.status,
+ businessContent: '',
+ companyArea: '', // 区
+ companyCity: '', // 市
+ companyProvince: '', // 省
+ companyCountry: '', // 国家
+ companyAreaName: '', // 区
+ companyCityName: '', // 市
+ companyCountryName: '', // 国家
+ companyProvinceName: '', // 省
+ companyAddress: '',
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ supplierName: '',
+ supplierNo: '',
+ offset: 1,
+ limit: 20,
+}
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
@@ -77,10 +101,10 @@
// 获取数据
const fetchData = (isNowPage: boolean, isReset = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { companyProvinceName: string; companyCityName: string }) => {
return {
diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue
index 39a626b..7efba1b 100644
--- a/src/views/measure/source/list.vue
+++ b/src/views/measure/source/list.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
@@ -20,6 +21,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source') || {
+ supplierNo: '', // 业务内容
+ supplierName: '', // 溯源供方名称
+ businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
// 表格数据
const list = ref([])
const { proxy } = getCurrentInstance() as any
@@ -82,10 +96,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getSoucreList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ISupplier) => {
if (item.companyProvinceName && item.companyCityName) {
diff --git a/src/views/measure/train/components/listApproval.vue b/src/views/measure/train/components/listApproval.vue
index 970561c..86b0602 100644
--- a/src/views/measure/train/components/listApproval.vue
+++ b/src/views/measure/train/components/listApproval.vue
@@ -11,6 +11,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -43,6 +44,24 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-train-plan', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-train-plan') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.TRAIN_APPROVAL, // 表单id
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ deptId: '', // 部门id
+ director: '', // 负责人
+ effectiveCompany: '', // 实施单位
+ trainEndTime: '', // 培训结束时间
+ trainStartTime: '', // 培训开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 筛选时间段数据-创建时间
const createTimeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 筛选时间段数据-培训时间
@@ -77,10 +96,10 @@
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 64824df..7017517 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -13,10 +13,11 @@
import type { dictType } from '@/global'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $route = useRoute()
const $router = useRouter()
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -27,6 +28,23 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-person', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-person') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/price/list.vue b/src/views/measure/price/list.vue
index 094cf2e..69cbdb1 100644
--- a/src/views/measure/price/list.vue
+++ b/src/views/measure/price/list.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import useTemplateDownload from '@/utils/useTemplateDownload'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery = ref({
checkType: '', // 检校类型
@@ -22,6 +23,22 @@
offset: 1, // 页码
limit: 20, // 分页数量
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-price', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-price') || {
+ checkType: '', // 检校类型
+ priceItem: '', // 项目
+ priceName: '', // 价格名称
+ categoryName: '', // 类别名称
+ itemName: '', // 项目名称
+ priceNo: '', // 价格编号
+ priceType: '', // 类别id
+ offset: 1, // 页码
+ limit: 20, // 分页数量
+}
// 表格数据
const list = ref([])
// 总数
@@ -52,9 +69,9 @@
const loadingTable = ref(false)
// 查询列表
const fetchData = (isNowPage = false) => {
- if (!isNowPage) {
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // listQuery.value.offset = 1
+ // }
loadingTable.value = true
getPriceList(listQuery.value).then((response) => {
list.value = response.data.records
@@ -62,7 +79,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 9284df6..9560cba 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -10,6 +10,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval, submitApproval } from '@/api/approval'
import type { IAddress } from '@/components/AddressSelect/address-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -50,6 +51,29 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source-list', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source-list') || {
+ approvalStatus: props.status,
+ businessContent: '',
+ companyArea: '', // 区
+ companyCity: '', // 市
+ companyProvince: '', // 省
+ companyCountry: '', // 国家
+ companyAreaName: '', // 区
+ companyCityName: '', // 市
+ companyCountryName: '', // 国家
+ companyProvinceName: '', // 省
+ companyAddress: '',
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ supplierName: '',
+ supplierNo: '',
+ offset: 1,
+ limit: 20,
+}
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
@@ -77,10 +101,10 @@
// 获取数据
const fetchData = (isNowPage: boolean, isReset = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { companyProvinceName: string; companyCityName: string }) => {
return {
diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue
index 39a626b..7efba1b 100644
--- a/src/views/measure/source/list.vue
+++ b/src/views/measure/source/list.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
@@ -20,6 +21,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source') || {
+ supplierNo: '', // 业务内容
+ supplierName: '', // 溯源供方名称
+ businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
// 表格数据
const list = ref([])
const { proxy } = getCurrentInstance() as any
@@ -82,10 +96,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getSoucreList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ISupplier) => {
if (item.companyProvinceName && item.companyCityName) {
diff --git a/src/views/measure/train/components/listApproval.vue b/src/views/measure/train/components/listApproval.vue
index 970561c..86b0602 100644
--- a/src/views/measure/train/components/listApproval.vue
+++ b/src/views/measure/train/components/listApproval.vue
@@ -11,6 +11,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -43,6 +44,24 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-train-plan', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-train-plan') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.TRAIN_APPROVAL, // 表单id
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ deptId: '', // 部门id
+ director: '', // 负责人
+ effectiveCompany: '', // 实施单位
+ trainEndTime: '', // 培训结束时间
+ trainStartTime: '', // 培训开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 筛选时间段数据-创建时间
const createTimeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 筛选时间段数据-培训时间
@@ -77,10 +96,10 @@
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue
index b167458..3519399 100644
--- a/src/views/measure/train/plan.vue
+++ b/src/views/measure/train/plan.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const listQuery = ref({
createEndTime: '', // 创建结束时间
createStartTime: '', // 创建开始时间
@@ -21,6 +22,24 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-plan', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-plan') || {
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ deptId: '', // 部门id
+ director: '', // 负责人
+ effectiveCompany: '', // 实施单位
+ ids: [], // 导出数组
+ trainEndTime: '', // 培训结束时间
+ formId: SCHEDULE.TRAIN_APPROVAL, // 表单id
+ trainStartTime: '', // 培训开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
const checkoutList = ref([])
const list = ref([])
const total = ref(0)
@@ -37,17 +56,19 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPlanList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
const { proxy } = getCurrentInstance() as any
// 表头
const columns = ref([
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 64824df..7017517 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -13,10 +13,11 @@
import type { dictType } from '@/global'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $route = useRoute()
const $router = useRouter()
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -27,6 +28,23 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-person', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-person') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/price/list.vue b/src/views/measure/price/list.vue
index 094cf2e..69cbdb1 100644
--- a/src/views/measure/price/list.vue
+++ b/src/views/measure/price/list.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import useTemplateDownload from '@/utils/useTemplateDownload'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery = ref({
checkType: '', // 检校类型
@@ -22,6 +23,22 @@
offset: 1, // 页码
limit: 20, // 分页数量
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-price', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-price') || {
+ checkType: '', // 检校类型
+ priceItem: '', // 项目
+ priceName: '', // 价格名称
+ categoryName: '', // 类别名称
+ itemName: '', // 项目名称
+ priceNo: '', // 价格编号
+ priceType: '', // 类别id
+ offset: 1, // 页码
+ limit: 20, // 分页数量
+}
// 表格数据
const list = ref([])
// 总数
@@ -52,9 +69,9 @@
const loadingTable = ref(false)
// 查询列表
const fetchData = (isNowPage = false) => {
- if (!isNowPage) {
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // listQuery.value.offset = 1
+ // }
loadingTable.value = true
getPriceList(listQuery.value).then((response) => {
list.value = response.data.records
@@ -62,7 +79,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 9284df6..9560cba 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -10,6 +10,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval, submitApproval } from '@/api/approval'
import type { IAddress } from '@/components/AddressSelect/address-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -50,6 +51,29 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source-list', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source-list') || {
+ approvalStatus: props.status,
+ businessContent: '',
+ companyArea: '', // 区
+ companyCity: '', // 市
+ companyProvince: '', // 省
+ companyCountry: '', // 国家
+ companyAreaName: '', // 区
+ companyCityName: '', // 市
+ companyCountryName: '', // 国家
+ companyProvinceName: '', // 省
+ companyAddress: '',
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ supplierName: '',
+ supplierNo: '',
+ offset: 1,
+ limit: 20,
+}
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
@@ -77,10 +101,10 @@
// 获取数据
const fetchData = (isNowPage: boolean, isReset = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { companyProvinceName: string; companyCityName: string }) => {
return {
diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue
index 39a626b..7efba1b 100644
--- a/src/views/measure/source/list.vue
+++ b/src/views/measure/source/list.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
@@ -20,6 +21,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source') || {
+ supplierNo: '', // 业务内容
+ supplierName: '', // 溯源供方名称
+ businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
// 表格数据
const list = ref([])
const { proxy } = getCurrentInstance() as any
@@ -82,10 +96,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getSoucreList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ISupplier) => {
if (item.companyProvinceName && item.companyCityName) {
diff --git a/src/views/measure/train/components/listApproval.vue b/src/views/measure/train/components/listApproval.vue
index 970561c..86b0602 100644
--- a/src/views/measure/train/components/listApproval.vue
+++ b/src/views/measure/train/components/listApproval.vue
@@ -11,6 +11,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -43,6 +44,24 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-train-plan', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-train-plan') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.TRAIN_APPROVAL, // 表单id
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ deptId: '', // 部门id
+ director: '', // 负责人
+ effectiveCompany: '', // 实施单位
+ trainEndTime: '', // 培训结束时间
+ trainStartTime: '', // 培训开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 筛选时间段数据-创建时间
const createTimeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 筛选时间段数据-培训时间
@@ -77,10 +96,10 @@
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue
index b167458..3519399 100644
--- a/src/views/measure/train/plan.vue
+++ b/src/views/measure/train/plan.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const listQuery = ref({
createEndTime: '', // 创建结束时间
createStartTime: '', // 创建开始时间
@@ -21,6 +22,24 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-plan', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-plan') || {
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ deptId: '', // 部门id
+ director: '', // 负责人
+ effectiveCompany: '', // 实施单位
+ ids: [], // 导出数组
+ trainEndTime: '', // 培训结束时间
+ formId: SCHEDULE.TRAIN_APPROVAL, // 表单id
+ trainStartTime: '', // 培训开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
const checkoutList = ref([])
const list = ref([])
const total = ref(0)
@@ -37,17 +56,19 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPlanList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
const { proxy } = getCurrentInstance() as any
// 表头
const columns = ref([
diff --git a/src/views/measure/train/trainLog.vue b/src/views/measure/train/trainLog.vue
index 049f38c..1ed652d 100644
--- a/src/views/measure/train/trainLog.vue
+++ b/src/views/measure/train/trainLog.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const listQuery = ref({
createEndTime: '', // 创建结束时间
createStartTime: '', // 创建开始时间
@@ -20,6 +21,21 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-trainLog', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-trainLog') || {
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ logNo: '', // 记录编号
+ trainStartTime: '', // 培训开始时间
+ trainEndTime: '', // 培训结束时间
+ trainName: '', // 培训名称
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
const checkoutList = ref([])
const list = ref([])
const total = ref(0)
@@ -37,17 +53,19 @@
const $router = useRouter()
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getLogList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 表头
const columns = ref([
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 64824df..7017517 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -13,10 +13,11 @@
import type { dictType } from '@/global'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $route = useRoute()
const $router = useRouter()
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -27,6 +28,23 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-person', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-person') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/price/list.vue b/src/views/measure/price/list.vue
index 094cf2e..69cbdb1 100644
--- a/src/views/measure/price/list.vue
+++ b/src/views/measure/price/list.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import useTemplateDownload from '@/utils/useTemplateDownload'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery = ref({
checkType: '', // 检校类型
@@ -22,6 +23,22 @@
offset: 1, // 页码
limit: 20, // 分页数量
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-price', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-price') || {
+ checkType: '', // 检校类型
+ priceItem: '', // 项目
+ priceName: '', // 价格名称
+ categoryName: '', // 类别名称
+ itemName: '', // 项目名称
+ priceNo: '', // 价格编号
+ priceType: '', // 类别id
+ offset: 1, // 页码
+ limit: 20, // 分页数量
+}
// 表格数据
const list = ref([])
// 总数
@@ -52,9 +69,9 @@
const loadingTable = ref(false)
// 查询列表
const fetchData = (isNowPage = false) => {
- if (!isNowPage) {
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // listQuery.value.offset = 1
+ // }
loadingTable.value = true
getPriceList(listQuery.value).then((response) => {
list.value = response.data.records
@@ -62,7 +79,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 9284df6..9560cba 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -10,6 +10,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval, submitApproval } from '@/api/approval'
import type { IAddress } from '@/components/AddressSelect/address-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -50,6 +51,29 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source-list', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source-list') || {
+ approvalStatus: props.status,
+ businessContent: '',
+ companyArea: '', // 区
+ companyCity: '', // 市
+ companyProvince: '', // 省
+ companyCountry: '', // 国家
+ companyAreaName: '', // 区
+ companyCityName: '', // 市
+ companyCountryName: '', // 国家
+ companyProvinceName: '', // 省
+ companyAddress: '',
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ supplierName: '',
+ supplierNo: '',
+ offset: 1,
+ limit: 20,
+}
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
@@ -77,10 +101,10 @@
// 获取数据
const fetchData = (isNowPage: boolean, isReset = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { companyProvinceName: string; companyCityName: string }) => {
return {
diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue
index 39a626b..7efba1b 100644
--- a/src/views/measure/source/list.vue
+++ b/src/views/measure/source/list.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
@@ -20,6 +21,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source') || {
+ supplierNo: '', // 业务内容
+ supplierName: '', // 溯源供方名称
+ businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
// 表格数据
const list = ref([])
const { proxy } = getCurrentInstance() as any
@@ -82,10 +96,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getSoucreList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ISupplier) => {
if (item.companyProvinceName && item.companyCityName) {
diff --git a/src/views/measure/train/components/listApproval.vue b/src/views/measure/train/components/listApproval.vue
index 970561c..86b0602 100644
--- a/src/views/measure/train/components/listApproval.vue
+++ b/src/views/measure/train/components/listApproval.vue
@@ -11,6 +11,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -43,6 +44,24 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-train-plan', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-train-plan') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.TRAIN_APPROVAL, // 表单id
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ deptId: '', // 部门id
+ director: '', // 负责人
+ effectiveCompany: '', // 实施单位
+ trainEndTime: '', // 培训结束时间
+ trainStartTime: '', // 培训开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 筛选时间段数据-创建时间
const createTimeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 筛选时间段数据-培训时间
@@ -77,10 +96,10 @@
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue
index b167458..3519399 100644
--- a/src/views/measure/train/plan.vue
+++ b/src/views/measure/train/plan.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const listQuery = ref({
createEndTime: '', // 创建结束时间
createStartTime: '', // 创建开始时间
@@ -21,6 +22,24 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-plan', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-plan') || {
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ deptId: '', // 部门id
+ director: '', // 负责人
+ effectiveCompany: '', // 实施单位
+ ids: [], // 导出数组
+ trainEndTime: '', // 培训结束时间
+ formId: SCHEDULE.TRAIN_APPROVAL, // 表单id
+ trainStartTime: '', // 培训开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
const checkoutList = ref([])
const list = ref([])
const total = ref(0)
@@ -37,17 +56,19 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPlanList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
const { proxy } = getCurrentInstance() as any
// 表头
const columns = ref([
diff --git a/src/views/measure/train/trainLog.vue b/src/views/measure/train/trainLog.vue
index 049f38c..1ed652d 100644
--- a/src/views/measure/train/trainLog.vue
+++ b/src/views/measure/train/trainLog.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const listQuery = ref({
createEndTime: '', // 创建结束时间
createStartTime: '', // 创建开始时间
@@ -20,6 +21,21 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-trainLog', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-trainLog') || {
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ logNo: '', // 记录编号
+ trainStartTime: '', // 培训开始时间
+ trainEndTime: '', // 培训结束时间
+ trainName: '', // 培训名称
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
const checkoutList = ref([])
const list = ref([])
const total = ref(0)
@@ -37,17 +53,19 @@
const $router = useRouter()
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getLogList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 表头
const columns = ref([
diff --git a/src/views/measure/train/trainLogAdd.vue b/src/views/measure/train/trainLogAdd.vue
index 5d9aac5..471d222 100644
--- a/src/views/measure/train/trainLogAdd.vue
+++ b/src/views/measure/train/trainLogAdd.vue
@@ -50,6 +50,7 @@
trainStaffList: [], // 培训人员列表
trainTime: '', // 培训时间
})
+
const trainList = ref([]) // 人员信息列表数据
// 表头
const columns = ref([
diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts
index 0e470c4..32b5cd5 100644
--- a/src/api/business/lab/cert.ts
+++ b/src/api/business/lab/cert.ts
@@ -67,3 +67,14 @@
data,
})
}
+
+// 证书审批完成
+export function certificatePrintByProcess(id: string) {
+ return request({
+ url: '/business/certificateReport/approval/exportFile',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 5920e51..a5153ea 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -12,7 +12,9 @@
AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default']
AppContainer: typeof import('./components/AppContainer/index.vue')['default']
ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default']
+ ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default']
ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default']
+ ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default']
ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default']
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue
new file mode 100644
index 0000000..8264509
--- /dev/null
+++ b/src/components/Approval/ApprovalDialogByProcess.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue
new file mode 100644
index 0000000..e150747
--- /dev/null
+++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row.nodeNumber + 1 }}
+
+
+
+
+
+
diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts
new file mode 100644
index 0000000..1604410
--- /dev/null
+++ b/src/components/ApprovalRecord/approval-interface.ts
@@ -0,0 +1,13 @@
+export interface IList {
+ assigneeName: string // 审批人姓名
+ cindex?: number
+ type: string // 状态
+ finishTime: string // 审批时间
+ comment: string // 审批意见
+ nodeNumber: number // 节点号
+ approvalStatus: string // 审批类型
+ duration: string // 用时
+ approvalLogs?: any[]
+ approvalLogsList?: any[]
+ countersignOrSign?: number // 类型 1会签、2或签
+}
diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts
new file mode 100644
index 0000000..d4e98f9
--- /dev/null
+++ b/src/utils/keepQuery.ts
@@ -0,0 +1,28 @@
+// 保存页面查询等参数
+/**
+ *
+ * @param sessionName session存储时的名字
+ * @param searchQuery 列表查询参数
+ */
+export const saveSearchParams = (sessionName: string, searchQuery: any) => {
+ sessionStorage.setItem(sessionName, JSON.stringify(searchQuery))
+}
+// 取出查询的参数
+export const renewSearchParams = (sessionName: string) => {
+ return JSON.parse(sessionStorage.getItem(sessionName) as string)
+}
+// 清空查询的参数
+export const clearSearchParams = (sessionName: string) => {
+ sessionStorage.removeItem(sessionName)
+}
+// 操作
+const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail']
+export function keepSearchParams(to: any, sessionName: string, searchQuery: any) {
+ if (needKeep.some((item: string) => to.includes(item))) {
+ // 保存参数
+ saveSearchParams(sessionName, searchQuery)
+ }
+ else {
+ clearSearchParams(sessionName)
+ }
+}
diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue
index 1bcad63..f7b8b04 100644
--- a/src/views/business/board/depComprehensive/list.vue
+++ b/src/views/business/board/depComprehensive/list.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getUsersDept } from '@/api/device/standard'
import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
// 部门
const standardUsersDeptList = ref([]) as any
@@ -20,6 +21,16 @@
startTime: '', // 开始时间
endTime: '', // 结束时间
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'depComprehensive', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('depComprehensive') || {
+ deptId: '', // 部门id
+ startTime: '', // 开始时间
+ endTime: '', // 结束时间
+}
// 表头
const columns = ref([
{ text: '部门', value: 'deptName', width: '160', align: 'center' },
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index f88cf13..2726643 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -15,6 +15,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const useDeptList = ref([]) // 部门列表
@@ -32,6 +33,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'equipmentReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('equipmentReminder') || {
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ mesureType: '', // 检定方式
+ useDept: '', // 使用部门
+ usePerson: '', // 使用人
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' },
@@ -77,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentReminderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { validDate: string }) => {
return {
diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue
index 4cec39e..b99f309 100644
--- a/src/views/business/board/overdueReminder/list.vue
+++ b/src/views/business/board/overdueReminder/list.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportTaskList, getTaskList } from '@/api/business/schedule/task'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -26,6 +27,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'overdueReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('overdueReminder') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '8', // 样品状态:8已超期
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center' },
@@ -53,10 +73,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getTaskList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
@@ -183,7 +203,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/board/standardReminder/list.vue b/src/views/business/board/standardReminder/list.vue
index 7c21576..919ad4c 100644
--- a/src/views/business/board/standardReminder/list.vue
+++ b/src/views/business/board/standardReminder/list.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'standardReminder', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('standardReminder') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -122,10 +142,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -138,7 +158,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index 448823e..c95bbec 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -12,6 +12,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { delFieldTestApproveList, getFieldTestApproveList, submit } from '@/api/business/fieldTest/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
@@ -31,7 +32,20 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-approve') || {
+ approvalStatus: '', // 审批状态类型code
+ customerName: '', // 委托方名称
+ directorName: '', // 负责人
+ formId: SCHEDULE.BUSINESS_FIELDTEST_APPROVE, // 表单id
+ siteExecutiveNo: '', // 现场检测编号
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
@@ -57,10 +71,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestApproveList(listQuery.value).then((response) => {
list.value = response.data.rows
@@ -238,7 +252,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
@@ -249,6 +265,7 @@
else {
active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
}
+ // fetchData(true)
})
diff --git a/src/views/business/fieldTest/record/list.vue b/src/views/business/fieldTest/record/list.vue
index 18376c9..234f085 100644
--- a/src/views/business/fieldTest/record/list.vue
+++ b/src/views/business/fieldTest/record/list.vue
@@ -14,6 +14,7 @@
import { delFieldTestRecordList, exportRecordDetail, getFieldTestRecordList } from '@/api/business/fieldTest/record'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -31,7 +32,19 @@
limit: 20,
offset: 1,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'fieldTest-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('fieldTest-record') || {
+ laboratoryName: '', // 实验室
+ logNo: '', // 记录编号
+ recorderName: '', // 记录人
+ customerName: '', // 委托方名称
+ limit: 20,
+ offset: 1,
+}
// 表头
const columns = ref([
{ text: '记录编号', value: 'logNo', align: 'center', width: '160px' },
@@ -54,10 +67,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getFieldTestRecordList(listQuery.value).then((response) => {
list.value = response.data.rows
diff --git a/src/views/business/lab/certificateReportRetrieval/reportList.vue b/src/views/business/lab/certificateReportRetrieval/reportList.vue
index 5a52b70..b093e99 100644
--- a/src/views/business/lab/certificateReportRetrieval/reportList.vue
+++ b/src/views/business/lab/certificateReportRetrieval/reportList.vue
@@ -127,6 +127,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue
index 1036a91..d4c911b 100644
--- a/src/views/business/lab/deptMeasure/deptMeasureList.vue
+++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue
@@ -14,7 +14,7 @@
import { exportTaskList, getDeptMeasureList, getTaskList, myExecutiveDone } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -36,6 +36,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-deptMeasure', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-deptMeasure') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -86,10 +105,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
list.value = []
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
@@ -260,7 +279,10 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('deptMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+
+ fetchData(true)
}
// 时间变更
watch(timeRange, (val) => {
diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue
index 4e4eb46..48f86a7 100644
--- a/src/views/business/lab/environmental/environmentalList.vue
+++ b/src/views/business/lab/environmental/environmentalList.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -20,6 +21,19 @@
offset: 1, // 当前页
limit: 20, // 多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'environmental', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('environmental') || {
+ environmentCode: '', // 记录单编号
+ roomNumber: '', // 房间号
+ startTime: '', // 记录开始时间
+ endTime: '', // 记录结束时间
+ offset: 1, // 当前页
+ limit: 20, // 多少条
+}
const checkoutList = ref([]) // 多选选中参数
const list = ref([]) // 表格参数
const total = ref(0)
@@ -53,17 +67,19 @@
// listQuery.value.startTime = trainTime.value[0] || ''
// listQuery.value.endTime = trainTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEnvironmentRecordList(listQuery.value).then((res) => {
list.value = res.data.rows
total.value = res.data.total
})
loadingTable.value = false
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 搜索
const searchList = () => {
diff --git a/src/views/business/lab/myMeasure/measureDetail.vue b/src/views/business/lab/myMeasure/measureDetail.vue
index b8a4cbc..f0924ad 100644
--- a/src/views/business/lab/myMeasure/measureDetail.vue
+++ b/src/views/business/lab/myMeasure/measureDetail.vue
@@ -8,11 +8,11 @@
import type { SimpleCertification, SimpleMeasureRecord } from '@/views/customer/sample/list/sample_list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getTaskDetail } from '@/api/business/schedule/task'
+import { certificatePrintDetail, certificatePrintInvalid } from '@/api/business/lab/cert'
import countries from '@/components/AddressSelect/country-code.json'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { getSapmleDetail, updateSample } from '@/api/customer/sampleList'
-import { certificatePrintInvalid } from '@/api/business/lab/cert'
interface dictType {
id: string
name: string
@@ -315,8 +315,19 @@
ElMessage.success('操作成功')
$router.go(-1)
})
+ // certificatePrintDetail({ id: row.id }).then((res) => {
+ // certificatePrintInvalid({
+ // orderId: res.data.orderId,
+ // sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
+ // }).then((res) => {
+ // ElMessage.success('操作成功')
+ // $router.go(-1)
+ // })
+ // })
})
}
+const { proxy } = getCurrentInstance() as any
diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue
index 7c988b3..8b5cb3c 100644
--- a/src/views/business/lab/myMeasure/myMeasureList.vue
+++ b/src/views/business/lab/myMeasure/myMeasureList.vue
@@ -13,6 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { claimTasks, getMyMeasureList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import type { dictType } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
getReportDetail,
} from '@/api/business/lab/report'
@@ -39,6 +40,26 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'lab-myMeasureList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('lab-myMeasureList') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ measureStatus: active.value, // 检测状态
+ remark: '', // 备注
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -89,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (!listQuery.value.measureStatus) {
listQuery.value.measureStatus = '2' // 待检测
}
@@ -282,7 +303,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('myMeasureActive', val)
- clearList()
+ // clearList()
+ listQuery.value.measureStatus = active.value
+ fetchData(true)
}
// 点击生成原始记录
@@ -327,8 +350,10 @@
$router.push({
path: `/lab/reportOnCredentialsApproval/${type}/${row.certificateReportId}`,
query: {
+ processId: data.processId,
row: JSON.stringify(data),
originalRecordId: row.originalRecordId,
+ // processId: data.processId,
},
})
}
@@ -433,7 +458,7 @@
-
+
{{
row.remark
diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue
index 6683656..3f27c6c 100644
--- a/src/views/business/lab/primitiveLog/primitiveLogList.vue
+++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue
@@ -8,7 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 初始化路由
// 查询条件
@@ -23,6 +23,22 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'primitiveLogList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('primitiveLogList') || {
+ measureCategory: '', // 校验类别
+ createUser: '', // 创建人
+ manufacturingNo: '', // 出厂编号
+ originalRecordCode: '', // 原始记录单编号
+ sampleModel: '', // 样品型号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 多选选中
const checkoutList = ref([])
const list = ref([]) // 数据列表
@@ -53,10 +69,10 @@
// 列表数据查询
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPrimitiveLogList(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: IList) => {
return {
diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
index eca3bcb..61dffe9 100644
--- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
+++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue
@@ -10,7 +10,7 @@
import selectPrimitiveLogList from '../../components/selectPrimitiveLogList.vue'
import selectReportTemplate from '../../components/selectReportTemplate.vue'
import selectSignature from '../../components/selectSignature.vue'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval'
import { getStaffList } from '@/api/measure/person'
import { downloadFile } from '@/utils/download'
@@ -465,13 +465,13 @@
}
else if (val === '同意') {
- approvalDialog.value.initDialog('agree', taskId.value)
+ approvalDialog.value.initDialog('agree', taskId.value, infoId.value)
}
else if (val === '驳回') {
- approvalDialog.value.initDialog('reject', taskId.value)
+ approvalDialog.value.initDialog('reject', taskId.value, infoId.value)
}
else if (val === '拒绝') {
- approvalDialog.value.initDialog('refuse', taskId.value)
+ approvalDialog.value.initDialog('refuse', taskId.value, infoId.value)
}
}
// -------------------------------------------原始记录------------------------------------
@@ -1152,10 +1152,11 @@
/>
-
-
-
-
+
+
+
+
+
diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
index 82d57f9..48ef8f3 100644
--- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
+++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue
@@ -13,12 +13,13 @@
getReportList,
submitReport,
} from '@/api/business/lab/report'
-import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue'
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -47,6 +48,23 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'reportOnCredentialsList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('reportOnCredentialsList') || {
+ approvalStatus: '', // 审批状态 -- 全部
+ certificateReportCode: '', // 证书号
+ customerName: '', // 委托方名称
+ measureCategory: '', // 检校类别
+ orderCode: '', // 委托书编号
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
// 表格数据
const list = ref([])
@@ -90,10 +108,10 @@
// 获取列表数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
if (listQuery.value.approvalStatus === '') {
listQuery.value.approvalStatus = '0'
}
@@ -250,13 +268,13 @@
goDetail(row, 'edit')
break
case '同意':
- approvalDialog.value.initDialog('agree', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('agree', row.taskId, row.id, row.decisionItem)
break
case '驳回':
- approvalDialog.value.initDialog('reject', row.taskId, row.decisionItem)
+ approvalDialog.value.initDialog('reject', row.taskId, row.id, row.decisionItem)
break
case '拒绝':
- approvalDialog.value.initDialog('refuse', row.taskId)
+ approvalDialog.value.initDialog('refuse', row.taskId, row.id)
break
case '取消':
handleCancel(row)
diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue
index 405482b..e88903c 100644
--- a/src/views/business/schedule/certPrint/certList.vue
+++ b/src/views/business/schedule/certPrint/certList.vue
@@ -18,6 +18,7 @@
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { changePrintStatus, getPdfStream, getPhotoUrl } from '@/api/system/tool'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { download } from '@/utils/download'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -47,6 +48,31 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-certPrint', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-certPrint') || {
+ certificateNo: '', // 证书编号
+ createUserId: 0,
+ printStatus: '', // 可打印(证书可打印传0,全部传null)
+ orderNo: '', // 委托书编号
+ customerName: '', // 委托方名称
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ certificateClass: '', // 证书类型
+ printNum: '', // 打印次数 -未打印和全部用
+ approvalStatus: active.value, // 审批状态-审批查询用
+ orderId: '', // 委托书id
+ reason: '', // 操作原因
+ sampleId: '', // 样品id
+ status: '', // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5)
+ formId: SCHEDULE.BUSINESS_CERT_PRINT,
+ ids: null, // 设置默认值
+ offset: 1,
+ limit: 20,
+}
const approvalDialogPart = ref() // 审批组件
// --------------获取所需字典值----------------
const certificationClassList = ref([]) // 样品属性列表
@@ -138,10 +164,10 @@
function fetchData(isNowPage = false) {
filterQuery()
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
loadingTable.value = false
getCertList(listQuery.value).then((response) => {
@@ -371,7 +397,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('certPrintActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 重检按钮
const recheck = (row: ICerPrintList) => {
@@ -388,6 +416,7 @@
certificatePrintInvalid({
orderId: res.data.orderId,
sampleId: res.data.sampleId,
+ // certificateReportCode: res.data.certificateReportCode,
}).then((res) => {
ElMessage.success('操作成功')
fetchData(true)
diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue
index a3e3ffe..01bcba8 100644
--- a/src/views/business/schedule/interchange/interchangeList.vue
+++ b/src/views/business/schedule/interchange/interchangeList.vue
@@ -23,6 +23,7 @@
import buttonBox from '@/components/buttonBox/buttonBox.vue'
import { tagBinding } from '@/api/reader'
import { Settings } from '@/global'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const menu = ref([]) // 右上角菜单
@@ -49,6 +50,24 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchange', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchange') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ startTime: '', // 预计送达开始时间
+ endTime: '', // 预计送达结束时间
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ sampleStatus: '', // 样品状态
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头待收入
const columnsTaking = ref([
@@ -149,10 +168,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.sampleStatus = active.value
@@ -221,7 +240,9 @@
currentMenu.value = currentMenuItem!.name
}
window.sessionStorage.setItem('interchangeActive', val)
- clearList()
+ // clearList()
+ // listQuery.value = active.value
+ fetchData(true) // 列表数据
}
// 导出
diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue
index f69a5d2..b0f211d 100644
--- a/src/views/business/schedule/interchangeReceipt/receiptList.vue
+++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue
@@ -8,7 +8,7 @@
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { deleteReceiptList, exportReceiptList, getReceiptList } from '@/api/business/schedule/interchangeReceipt'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -23,6 +23,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-interchangeReceipt', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-interchangeReceipt') || {
+ interchangeCode: '', // 交接单编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ reciever: '', // 接收人
+ deliverer: '', // 送样人
+ startTime: '', // 交接开始时间
+ endTime: '', // 交接结束时间
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '交接单编号', value: 'interchangeCode', align: 'center', width: '160px' },
@@ -56,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getReceiptList(listQuery.value).then((response) => {
@@ -177,7 +193,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue
index 5dffb34..2f6f5fb 100644
--- a/src/views/business/schedule/order/orderList.vue
+++ b/src/views/business/schedule/order/orderList.vue
@@ -9,6 +9,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { uploadApi } from '@/api/system/notice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
backOrder,
exportOrderList,
@@ -31,6 +32,21 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-order', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-order') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ isUrgent: '', // 是否加急 2全部 1是 0否
+ status: '', // 接收状态
+ offset: 1,
+ limit: 20,
+}
const isUrgentMap = ref([]) // 是否加急
const statusMap = ref([]) // 接收状态
const backReasonDialogRef = ref() // 退回弹出框ref
@@ -104,10 +120,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getOrderList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IOrderList) => {
return {
@@ -306,7 +322,9 @@
watch(() => correctType.value, (newValue) => {
measureType.value = !newValue
})
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue
index b1539e6..10e7fb6 100644
--- a/src/views/business/schedule/task/taskList.vue
+++ b/src/views/business/schedule/task/taskList.vue
@@ -15,7 +15,7 @@
import { tagBinding } from '@/api/reader'
import type { IMenu } from '@/components/buttonBox/buttonBox'
import { interchangeListUrge } from '@/api/business/schedule/interchangeList'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 右上角按钮
@@ -38,6 +38,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'schedule-task', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('schedule-task') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ orderNo: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ isUrgent: '', // 是否加急
+ sampleBelong: '', // 样品属性
+ startTime: '', // 应检完时间-开始
+ endTime: '', // 应检完时间-结束
+ sampleStatus: '2', // 样品状态:默认待分发
+ offset: 1,
+ limit: 20,
+}
// --------------获取所需字典值----------------
const sampleBelongList = ref([]) // 样品属性列表
function getDict() {
@@ -97,10 +116,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.sampleStatus = active.value || '2'
list.value = []
getTaskList(listQuery.value).then((response) => {
diff --git a/src/views/business/subpackage/apply/list.vue b/src/views/business/subpackage/apply/list.vue
index 2633a89..f9e75d5 100644
--- a/src/views/business/subpackage/apply/list.vue
+++ b/src/views/business/subpackage/apply/list.vue
@@ -14,6 +14,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
import { deleteListItem, getListPage, submit } from '@/api/business/subpackage/apply'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
const approvalDialog = ref() // 审批对话ref
@@ -38,7 +39,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-apply') || {
+ applicantEndTime: '', // 开始时间
+ applicantName: '', // 申请人名称
+ applicantStartTime: '', // 结束时间
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -270,7 +287,9 @@
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
onMounted(async () => {
diff --git a/src/views/business/subpackage/approve/list.vue b/src/views/business/subpackage/approve/list.vue
index 650fcb6..93eec9d 100644
--- a/src/views/business/subpackage/approve/list.vue
+++ b/src/views/business/subpackage/approve/list.vue
@@ -16,6 +16,7 @@
import { cancelApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $router = useRouter()
const $route = useRoute()
@@ -37,7 +38,22 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-approve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-approve') || {
+ approvalStatus: active.value, // 申请状态, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ evaluation: '', // 整体评价-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -94,10 +110,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
@@ -150,7 +166,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 打印
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 2fb9552..1207727 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -12,6 +12,7 @@
import { getPhotoUrl } from '@/api/system/tool'
import filePreviewDialog from '@/views/business/schedule/certPrint/components/filePreviewDialog.vue'
import { delCertificate, exportcertificateList, getcertificateList } from '@/api/business/subpackage/certificate'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
// 查询条件
@@ -26,6 +27,22 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-certificate', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-certificate') || {
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const printFileName = ref('') // 文件名称
const printStatusList = [
{
@@ -58,10 +75,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getcertificateList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 20e3113..87704d3 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -18,6 +18,7 @@
import { cancelApproval } from '@/api/approval'
import { getUserList } from '@/api/system/user'
import type { userType } from '@/views/system/user/user-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const approvalDialog = ref() // 审批对话ref
const $route = useRoute()
const $router = useRouter()
@@ -44,7 +45,24 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-check', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-check') || {
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
+ applicantName: '', // 申请人名称
+ approvalStatus: active.value, // 申请状态
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
+ outsourcerName: '', // 分包方名称
+ projectName: '', // 分包项目名称
+ projectNo: '', // 分包项目编号
+ createUserId: '', // 验收人id
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包项目编号', value: 'projectNo', align: 'center', width: '160px' },
@@ -64,10 +82,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
@@ -275,7 +293,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ // reset()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 选择器模糊查询
diff --git a/src/views/business/subpackage/record/list.vue b/src/views/business/subpackage/record/list.vue
index 51abc6d..0dce98a 100644
--- a/src/views/business/subpackage/record/list.vue
+++ b/src/views/business/subpackage/record/list.vue
@@ -12,6 +12,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSubpackageRecord, exportRecordList, getListPage } from '@/api/business/subpackage/record'
import { SCHEDULE } from '@/utils/scheduleDict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const loadingTable = ref(false)
const $router = useRouter()
@@ -25,7 +26,20 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'subpackage-record', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('subpackage-record') || {
+ formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE, // 表单id
+ outsourcerName: '', // 公司名称
+ businessSize: '', // 业务规模-字典code
+ grade: '', // 履约评级-字典code
+ outsourcerNo: '', // 分包方编号
+ offset: 1,
+ limit: 20,
+}
// 表头
const columns = ref([
{ text: '分包方编号', value: 'outsourcerNo', align: 'center', width: '160px' },
@@ -58,10 +72,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 模拟数据
getListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { addressProvinceName: string; addressCityName: string }) => {
diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue
index a0db900..2e1db89 100644
--- a/src/views/customer/advice/adviceList.vue
+++ b/src/views/customer/advice/adviceList.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import { deleteAdvice, exportAdviceList, getAdviceList } from '@/api/customer/advice'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -20,6 +21,20 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-advice', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-advice') || {
+ adviceNo: '', // 投诉编号
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ startTime: '', // 投诉开始时间
+ endTime: '', // 投诉结束时间
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -45,10 +60,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
listQuery.value.startTime = timeRange.value[0] as string || ''
listQuery.value.endTime = timeRange.value[1] as string || ''
getAdviceList(listQuery.value).then((response) => {
@@ -189,7 +204,9 @@
}
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/customerInfo/customerList.vue b/src/views/customer/customerInfo/customerList.vue
index c4827f2..a16c544 100644
--- a/src/views/customer/customerInfo/customerList.vue
+++ b/src/views/customer/customerInfo/customerList.vue
@@ -9,6 +9,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportCustomer, deleteCustomer, exportCustomerList, getCustomerList } from '@/api/customer/customer'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -25,6 +26,19 @@
name: string
value: string
}
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-customerInfo', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-customerInfo') || {
+ businessSize: '', // 业务规模
+ customerName: '', // 公司名称
+ customerNo: '', // 客户编号
+ grade: '', // 履约评级
+ offset: 1,
+ limit: 20,
+}
// const companySizeList = ref([]) // 公司规模列表
const businessSizeList = ref([]) // 业务规模列表
const gradeList = ref([]) // 履约评级列表
@@ -70,10 +84,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getCustomerList(listQuery.value).then((response) => {
// 模拟数据
// response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }]
@@ -257,7 +271,9 @@
}
// --------------------------------------------------------------------------------------------
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue
index 09929a4..fce43f4 100644
--- a/src/views/customer/sample/list/list.vue
+++ b/src/views/customer/sample/list/list.vue
@@ -11,6 +11,7 @@
import useTemplateDownload from '@/utils/useTemplateDownload'
import { batchImportSample, deleteSample, exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import type { IList } from '@/views/finance/contract/contract-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
// 查询条件
@@ -28,6 +29,25 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-sample', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-sample') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ manufacturer: '', // 生产厂家
+ manufacturingNo: '', // 出厂编号
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -72,10 +92,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
@@ -253,8 +273,9 @@
fileRef.value.click()
}
// --------------------------------------------------------------------------------------------
-
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
diff --git a/src/views/customer/sample/overTime/list.vue b/src/views/customer/sample/overTime/list.vue
index 6f465fc..0fa35e3 100644
--- a/src/views/customer/sample/overTime/list.vue
+++ b/src/views/customer/sample/overTime/list.vue
@@ -11,7 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { exportSapmleList, getSampleList } from '@/api/customer/sampleList'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const certificationStatusMap = ref([]) as any // 证书状况
const $router = useRouter()
@@ -29,7 +29,23 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'customer-overtime', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('customer-overtime') || {
+ sampleNo: '', // 样品编号
+ sampleName: '', // 样品名称
+ sampleModel: '', // 型号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ startTime: '', // 检定开始时间
+ endTime: '', // 检定结束时间
+ overtimeStatus: '1', // 样品超期状态 1已超期、0未超期、空字符串 已超期+未超期
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表头
const columns = ref([
@@ -81,10 +97,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
getSampleList(listQuery.value).then((response) => {
diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue
index f685105..2b03161 100644
--- a/src/views/device/borrow/borrowHandle.vue
+++ b/src/views/device/borrow/borrowHandle.vue
@@ -10,7 +10,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import type { IlistQuery, IlistType, dictType } from '@/views/device/receive/receive'
import { borrowApply, deleteApply, exportApply, getBorrowApplyList, returnApply } from '@/api/device/borrow'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { getDictByCode } from '@/api/system/dict'
import { toTreeList } from '@/utils/structure'
import type { userType } from '@/views/system/user/user-interface'
@@ -52,7 +52,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrowHandle', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrowHandle') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 借用开始日期
+ endTime: '', // 借用结束日期
+ approvalStatus: '4', // 审批状态 (已通过)
+ processResult: '1' || active.value, // 处置结果 (3个状态字典值)
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
@@ -145,13 +166,15 @@
active.value = '1'
activeTitle.value = '待借用'
window.sessionStorage.setItem('borrowhandleActive', '1')
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
else {
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowhandleActive', val)
- clearList()
+ // clearList()
}
}
diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue
index 9697cdb..40d4dac 100644
--- a/src/views/device/borrow/borrwoApply.vue
+++ b/src/views/device/borrow/borrwoApply.vue
@@ -24,6 +24,7 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const active = ref('') // 选中的按钮
const activeTitle = ref('') // active对应的审批状态名字
@@ -57,7 +58,28 @@
offset: 1,
limit: 20,
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'borrow-borrwoApply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('borrow-borrwoApply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态 1 2 3 对应待借用|已借用|已归还
+ processResult: '', // 处置结果
+ applyType: '2', // 申请类型 借用2
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_BORROW_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const permUrl = {
edit: '/device/borrow/borrowapply/update', // 编辑
agree: '/device/borrow/borrowapply/agree', // 同意
@@ -122,10 +144,10 @@
// 数据查询
const fetchData = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -195,7 +217,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('borrowButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 获取用户列表(增加模糊查询)
diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue
index c345d90..004f8b3 100644
--- a/src/views/device/deviceMaintenance/components/checkList.vue
+++ b/src/views/device/deviceMaintenance/components/checkList.vue
@@ -8,6 +8,7 @@
import { toTreeList } from '@/utils/structure'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getEquipmentApplyList } from '@/api/device/checkList'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { SCHEDULE } from '@/utils/scheduleDict'
const emits = defineEmits(['add'])
const dialogFormVisible = ref(false)
@@ -29,6 +30,28 @@
offset: 1,
limit: 5,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: '4',
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL,
+ applyName: '',
+ applyNo: '',
+ applyPerson: '',
+ applyType: '8',
+ applyUnit: '',
+ businessKeys: [],
+ createUser: '',
+ endTime: '',
+ ids: [],
+ processResult: '',
+ startTime: '',
+ offset: 1,
+ limit: 5,
+}
const loadingTable = ref(false)
const list = ref([]) // 表格数据
const total = ref(0)
diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue
index 4386d5f..28812fa 100644
--- a/src/views/device/deviceMaintenance/components/listApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listApproval.vue
@@ -15,6 +15,7 @@
import { exportFile } from '@/utils/exportUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -52,6 +53,28 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ console.log(to)
+ keepSearchParams(to.path, 'deviceMaintenance-checkList1', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList1') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '9', // 审批类型
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ checkApplyNo: '', // 检修申请编号
+ checkEndDate: '', // 检修结束时间
+ checkStartDate: '', // 检修开始时间
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -119,10 +142,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getacceptanceCheckList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
index 8980548..668ad87 100644
--- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
+++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue
@@ -13,6 +13,7 @@
import { printJSON } from '@/utils/printUtils'
import { cancelApproval } from '@/api/approval'
import { getDictByCode } from '@/api/system/dict'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -61,6 +62,30 @@
offset: 1, // 当前页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'deviceMaintenance-checkList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('deviceMaintenance-checkList') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.DEVICE_FIX_APPROVAL, // 表单id
+ applyName: '', // 审批名称
+ applyNo: '', // 审批编号
+ applyType: '8', // 审批类型
+ applyPerson: '',
+ checkApplyName: '',
+ applyUnit: '',
+ endTime: '',
+ startTime: '',
+ processResult: '',
+ businessKeys: [], // 业务主键列表(工作流查询用,不用前端传)
+ createUser: '', // 创建人
+ ids: [], // 主键集合
+ overhaulPerson: '', // 检修保养人
+ offset: 1, // 当前页
+ limit: 20, // 一页多少条
+}
// 表格数据
const list = ref([])
// 总数
@@ -129,10 +154,10 @@
// listQuery.value.startTime = checkTime.value[0] || ''
// listQuery.value.endTime = checkTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/device/deviceMaintenance/manageCheckList.vue b/src/views/device/deviceMaintenance/manageCheckList.vue
index de18467..b6799b2 100644
--- a/src/views/device/deviceMaintenance/manageCheckList.vue
+++ b/src/views/device/deviceMaintenance/manageCheckList.vue
@@ -9,6 +9,7 @@
import { getDeleteCheckInfo, getExportCheckInfoList, getcheckInfoList } from '@/api/device/checkList'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
checkStartDate: '', // 检查表开始时间
@@ -19,6 +20,20 @@
offset: 1, // 当前页
limit: 20, // 当前页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-manageCheckList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-manageCheckList') || {
+ checkStartDate: '', // 检查表开始时间
+ ids: [], // 导出id集合
+ checkEndDate: '', // 检查表结束时间
+ checkName: '', // 检查表名称
+ checkNo: '', // 检查表编号
+ offset: 1, // 当前页
+ limit: 20, // 当前页多少条
+}
// 表格数据
const list = ref([])
// 获取权限
@@ -80,10 +95,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.checkStartDate = checkDate.value[0] || ''
// listQuery.value.checkEndDate = checkDate.value[1] || ''
getcheckInfoList(listQuery.value).then((response) => {
@@ -97,7 +112,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/device/receive/apply/applyList.vue b/src/views/device/receive/apply/applyList.vue
index d0df822..e587e72 100644
--- a/src/views/device/receive/apply/applyList.vue
+++ b/src/views/device/receive/apply/applyList.vue
@@ -11,6 +11,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import {
delReceiveApplyList,
exportReceiveApplyList,
@@ -54,6 +55,28 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-apply', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-apply') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ approvalStatus: active.value, // 审批状态
+ processResult: '', // 处置结果
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const approvalStatusMap = ref({}) as any// 审批状态字典{1:草稿箱}
const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const list = ref([])// 表格数据
@@ -113,10 +136,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.startTime = timeRange.value[0] as string || ''
// listQuery.value.endTime = timeRange.value[1] as string || ''
listQuery.value.approvalStatus = active.value
@@ -297,7 +320,9 @@
active.value = val
activeTitle.value = menu.value.find(item => item.id === val)!.name
window.sessionStorage.setItem('receiveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.approvalStatus = active.value
+ fetchData(true)
}
// 审批结束回调
diff --git a/src/views/device/receive/solve/solveList.vue b/src/views/device/receive/solve/solveList.vue
index 93bee2c..786e4ab 100644
--- a/src/views/device/receive/solve/solveList.vue
+++ b/src/views/device/receive/solve/solveList.vue
@@ -23,7 +23,7 @@
} from '@/api/device/receive'
import { getDictByCode } from '@/api/system/dict'
import type { IMenu } from '@/components/buttonBox/buttonBox'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const useDeptList = ref([]) // 部门列表
const usePersonList = ref([]) // 申请人列表(用户)
const usePersonOptions = ref([]) // 申请人列表(用户)--模糊搜索数据
@@ -52,6 +52,30 @@
offset: 1,
limit: 20,
})
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'receive-solve', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('receive-solve') || {
+ applyNo: '', // 申请编号
+ applyName: '', // 申请名称
+ applyUnit: '', // 申请部门id
+ applyUnitName: '', // 申请部门名称
+ applyPerson: '', // 申请人id
+ applyPersonName: '', // 申请人姓名
+ startTime: '', // 领用开始日期
+ endTime: '', // 领用结束日期
+ equipmentApplyProcessResult: active.value, // 设备申请处理结果--4待领用、5已领用
+ approvalStatus: '4', // 审批状态--已通过
+ processResult: active.value, // 处置结果--4待领用、5已领用
+ applyType: '1', // 申请类型 领用1
+ createUser: '', // 创建人
+ formId: SCHEDULE.DEVICE_CONSUMING_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
const timeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 表格数据
@@ -134,10 +158,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getReceiveApplyList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IsolveListType) => {
return {
@@ -273,7 +297,9 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem('receiveSolveButtonBoxActive', val)
- clearList()
+ // clearList()
+ listQuery.value.processResult = active.value
+ fetchData(true)
}
// 标签识别
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index f722fa0..84f7f00 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -12,7 +12,7 @@
import { cancelApproval, submitApproval } from '@/api/approval'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -54,6 +54,26 @@
limit: 20, // 一页多少条
offset: 1, // 第几页
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-listPage-${props.name}`, listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams(`device-listPage-${props.name}`) || {
+ applyUnit: '', // 申请部门
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyType: props.applyType, // 申请类型
+ approvalStatus: props.approvalStatus, // 审批状态
+ createUser: '', // 用户
+ equipmentNo: '', // 设备编号
+ organizeNo: '',
+ formId: props.schedule, // 表单id
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ limit: 20, // 一页多少条
+ offset: 1, // 第几页
+}
// 获取数据
const useDeptList = ref([])
// 初始化路由
@@ -172,17 +192,19 @@
})
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getstandardEquipmentApplyList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index e68c513..fabce63 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -10,6 +10,7 @@
import { exportRemindList, getRemindListPage, getStandardListDelete, getUsersDept, setRemind } from '@/api/device/standard'
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 逻辑代码
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-expirationRemind', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-expirationRemind') || {
+ category: '', // 类别
+ id: '', // 主键id
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 结束时间
+ preparationStartDate: '', // 开始时间
+ standardLaboratory: '', // 标准所在部门
+ standardName: '', // 标准名称
+ standardNo: '', // 标准编号
+ validEndTime: '', // 结束时间
+ validStartTime: '', // 开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 获取权限
const { proxy } = getCurrentInstance() as any
const list = ref([]) // 存放数据
@@ -128,10 +148,10 @@
// listQuery.value.validStartTime = validTime.value[0] || ''
// listQuery.value.validEndTime = validTime.value[1] || ''
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getRemindListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: any) => {
return {
@@ -144,7 +164,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue
index 86f849f..fa36f4b 100644
--- a/src/views/device/standardEquipment/standardList.vue
+++ b/src/views/device/standardEquipment/standardList.vue
@@ -10,6 +10,7 @@
import { getExportExcel, getStandardList, getStandardListDelete, getUsersDept } from '@/api/device/standard'
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 列表查询条件
const listQuery: Ref = ref({
category: '', // 类别
@@ -25,6 +26,25 @@
offset: 1, // 多少页
limit: 20, // 一页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-standardList', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('device-standardList') || {
+ category: '', // 类别
+ id: '', // 主键
+ managerState: '', // 管理状态
+ preparationEndDate: '', // 筹建日期结束
+ preparationStartDate: '', // 筹建日期开始
+ standardLaboratory: '', // 标准所在实验室
+ standardName: '', // 标准名称
+ standardNo: '', // 标准代码
+ validEndTime: '', // 到期结束时间
+ validStartTime: '', // 到期开始时间
+ offset: 1, // 多少页
+ limit: 20, // 一页多少条
+}
// 筹建日期
const preparationDate = ref('')
const list = ref([]) // 存放数据
@@ -116,10 +136,10 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// 筹建日期
// listQuery.value.preparationStartDate = preparationDate.value[0] || ''
// listQuery.value.preparationEndDate = preparationDate.value[1] || ''
@@ -134,7 +154,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 点击搜索
const searchList = () => {
fetchData(true)
diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue
index f9b940a..3bf9ba3 100644
--- a/src/views/device/standingBook/components/templatePage.vue
+++ b/src/views/device/standingBook/components/templatePage.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
import scanEquipmentDialog from '@/components/scanEquipmentDialog/index.vue'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
/**
* 页面名称
@@ -56,7 +57,7 @@
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const validDate = ref()
-const searchQuery: fixedAssetsParams = reactive({
+let searchQuery: fixedAssetsParams = reactive({
equipmentNo: '', // 设备编号
equipmentName: '', // 名称
mesureType: '', // 检定方式
@@ -75,6 +76,31 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-standingBook-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-standingBook-${props.name}`) || {
+ equipmentNo: '', // 设备编号
+ equipmentName: '', // 名称
+ mesureType: '', // 检定方式
+ managerState: '', // 管理状态
+ useDept: '', // 使用部门
+ assetType: '', // 资产类型
+ equipmentCategory: '', // 设备类别
+ isCalibrationTestEquipment: '', // 校准/检定设备
+ isMeasureAccount: '', // 测量工装
+ isStandardSupportEquipment: '', // 标准配套设备
+ isFixedAssets: '', // 固定资产
+ validDateStart: '', // 有效开始日期
+ validDateEnd: '', // 有效结束日期
+ abc: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
watch(() => searchQuery.abc, (newVal) => {
if (!newVal) {
searchQuery.abc = ''
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index 7f1a9f3..91e747d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -9,11 +9,12 @@
import { assetsDeleteApi, listExportApi, listImportApi, listPageApi } from '@/api/device/standingBook'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const scanEquipmentRef = ref() // 标签绑定弹窗ref
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
const $route = useRoute()
-const searchQuery = reactive({
+let searchQuery = reactive({
assetNo: '', // 固定编号
equipmentName: '', // 设备名称
modelNo: '', // 型号
@@ -24,6 +25,22 @@
ids: [] as string[],
isFixedAssets: '1',
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'device-fixedAssets', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('device-fixedAssets') || {
+ assetNo: '', // 固定编号
+ equipmentName: '', // 设备名称
+ modelNo: '', // 型号
+ equipmentSpecifications: '', // 设备规格
+ equipmentCategory: '', // 设备类型
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+ isFixedAssets: '1',
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue
index bb9a92e..9a87291 100644
--- a/src/views/device/stateManage/components/templateList.vue
+++ b/src/views/device/stateManage/components/templateList.vue
@@ -16,6 +16,7 @@
import { exportFile } from '@/utils/exportUtils'
import { getDeptTreeList } from '@/api/system/dept'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { deptType } from '@/views/device/standingBook/standingBook-interface'
// 选中的按钮
const props = defineProps({
@@ -54,7 +55,7 @@
// const approvalStatusReserveMap = ref({}) as any// 审批状态字典{草稿箱: 1}
const $router = useRouter()
// 查询参数
-const searchQuery = reactive({
+let searchQuery = reactive({
applyNo: '', // 申请编号
applyStatus: '', // 申请状态
applyUnit: '', // 申请单位
@@ -67,7 +68,24 @@
applyType: props.applyType, // 申请类型
formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
})
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `device-stateManage-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`device-stateManage-${props.name}`) || {
+ applyNo: '', // 申请编号
+ applyStatus: '', // 申请状态
+ applyUnit: '', // 申请单位
+ approvalStatus: approvalStatusVal.value, // 审批状态
+ createUser: '', // 创建人
+ equipmentName: '', // 设备名称
+ equipmentNo: '', // 设备编号
+ limit: 20,
+ offset: 1,
+ applyType: props.applyType, // 申请类型
+ formId: SCHEDULE[props.formCode as keyof typeof SCHEDULE],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
@@ -152,10 +170,10 @@
// 获取数据列表
const getList = (isNowPage = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- searchQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // searchQuery.offset = 1
+ // }
if (!searchQuery.approvalStatus) {
searchQuery.approvalStatus = '0'
}
diff --git a/src/views/finance/businessSettlement/list.vue b/src/views/finance/businessSettlement/list.vue
index 58676da..eea28d8 100644
--- a/src/views/finance/businessSettlement/list.vue
+++ b/src/views/finance/businessSettlement/list.vue
@@ -8,6 +8,7 @@
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { delBusinessSettlementList, exportBusinessSettlementList, getBusinessSettlementList } from '@/api/finance/businessSettlement'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
const isUrgentMap = ref([]) // 是否加急
@@ -21,6 +22,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'businessSettlement', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('businessSettlement') || {
+ orderCode: '', // 委托书编号
+ customerNo: '', // 委托方代码
+ customerName: '', // 委托方名称
+ deliverer: '', // 送样人
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
// 表头
@@ -47,10 +61,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getBusinessSettlementList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: IList) => {
return {
diff --git a/src/views/finance/contract/list.vue b/src/views/finance/contract/list.vue
index 980c557..3774177 100644
--- a/src/views/finance/contract/list.vue
+++ b/src/views/finance/contract/list.vue
@@ -14,6 +14,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { delContractList, getContractList, submitContractList } from '@/api/finance/contract'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import { calc } from '@/utils/useCalc'
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
@@ -37,6 +38,27 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'finance-contract', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('finance-contract') || {
+ agreementKind: '1', // 合同种类-收入合同1
+ agreementName: '', // 合同名字
+ agreementNo: '', // 合同编号
+ agreementType: '', // 合同类型-采购合同/业务合同等-字典code
+ customerId: '', // 单位id(客户id)(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ estimateSignEndDate: '', // 预计签订/实际签订结束日期
+ estimateSignStartDate: '', // 预计签订/实际签订开始日期
+ firstParty: '', // 单位名字(收入合同该字段为甲方单位,支出合同该字段为乙方单位)
+ formId: SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE, // 表单id
+ ids: [], // 导出ids
+ status: '', // 合同完成状态-字典code
+ approvalStatus: active.value, // 审批状态类型
+ offset: 1,
+ limit: 20,
+}
const total = ref(0) // 数据条数
const loadingTable = ref(false) // 表格loading
const menu = ref([]) // 审批状态按钮组合
@@ -73,10 +95,10 @@
// 数据查询
function fetchData(isNowPage = false) {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
// listQuery.value.estimateSignStartDate = dateRange.value[0] as string || ''
// listQuery.value.estimateSignEndDate = dateRange.value[1] as string || ''
getContractList(listQuery.value).then((response) => {
@@ -199,7 +221,8 @@
const changeCurrentButton = (val: string) => {
active.value = val
window.sessionStorage.setItem(TabActiveButton, val)
- reset()
+ listQuery.value.approvalStatus = active.value // 审批状态类型
+ fetchData(true)
}
// 操作
@@ -307,6 +330,7 @@
if ($router.options.history.state.back === '/comprehensive/approve') {
active.value = menu.value.find(item => item.name === '待审批')!.id as string // 全部
}
+ fetchData(true)
})
diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue
index 8448eff..108bac8 100644
--- a/src/views/measure/file/components/approve/templatePage.vue
+++ b/src/views/measure/file/components/approve/templatePage.vue
@@ -11,6 +11,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -51,6 +52,26 @@
formId: SCHEDULE.FILE_APPROVAL,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}-${props.status}`, searchQuery.value)
+})
+// 重新赋值
+searchQuery.value = renewSearchParams(`measure-file-${props.name}-${props.status}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ fileCode: '', // 文件号
+ createUser: '', // 创建人
+ createStartTime: '', // 创建开始时间
+ createEndTime: '', // 创建结束时间
+ approvalStatus: approvalStatus.value, // 审批状态
+ limit: 20,
+ offset: 1,
+ fileType: '', // 文件类别
+ formId: SCHEDULE.FILE_APPROVAL,
+ ids: [] as string[],
+}
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue
index d602a9b..e090121 100644
--- a/src/views/measure/file/components/templatePage.vue
+++ b/src/views/measure/file/components/templatePage.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
name: {
type: String,
@@ -24,7 +25,7 @@
const { proxy } = getCurrentInstance() as any
const publishTime = ref()
const effectiveTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
fileNo: '', // 编号
fileName: '', // 名称
// publishTime: '', // 发布时间
@@ -41,6 +42,28 @@
ids: [] as string[],
formId: SCHEDULE.FILE_APPROVAL,
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-file-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-file-${props.name}`) || {
+ fileNo: '', // 编号
+ fileName: '', // 名称
+ // publishTime: '', // 发布时间
+ fileCode: '', // 文件号
+ // effectiveTime: '', // 实施时间
+ effectiveStatus: '', // 实施状态
+ effectiveEndTime: '',
+ effectiveStartTime: '',
+ publishEndTime: '',
+ publishStartTime: '',
+ limit: 20,
+ offset: 1,
+ fileType: '', // 类型
+ ids: [] as string[],
+ formId: SCHEDULE.FILE_APPROVAL,
+})
watch(() => publishTime.value, (newVal) => {
if (newVal) {
searchQuery.publishStartTime = newVal[0]
diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue
index 30522e2..c67fb16 100644
--- a/src/views/measure/measureDept/components/templatePage.vue
+++ b/src/views/measure/measureDept/components/templatePage.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { exportFile } from '@/utils/exportUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { dictType } from '@/global'
const props = defineProps({
name: {
@@ -23,7 +24,7 @@
const $route = useRoute()
const { proxy } = getCurrentInstance() as any
const createTime = ref()
-const searchQuery = reactive({
+let searchQuery = reactive({
organizeNo: '', // 组织编号
organizeName: '', // 名称
limit: 20,
@@ -36,6 +37,24 @@
pDeptId: '', // 所属科室
ids: [] as string[],
}) // 查询参数
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, `measure-measureDept-${props.name}`, searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams(`measure-measureDept-${props.name}`) || {
+ organizeNo: '', // 组织编号
+ organizeName: '', // 名称
+ limit: 20,
+ offset: 1,
+ organizeType: '', // 类型
+ createEndTime: '',
+ createStartTime: '',
+ director: '', // 负责人
+ meterMajor: '', // 专业
+ pDeptId: '', // 所属科室
+ ids: [] as string[],
+})
watch(() => createTime.value, (newVal) => {
if (newVal) {
searchQuery.createStartTime = newVal[0]
diff --git a/src/views/measure/person/certificateLog.vue b/src/views/measure/person/certificateLog.vue
index 560171d..b571f69 100644
--- a/src/views/measure/person/certificateLog.vue
+++ b/src/views/measure/person/certificateLog.vue
@@ -9,6 +9,7 @@
import { exportFile } from '@/utils/exportUtils'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
import type { TableColumn } from '@/components/NormalTable/table_interface'
const props = defineProps({
@@ -24,7 +25,7 @@
const $route = useRoute()
const $router = useRouter()
const { proxy } = getCurrentInstance() as any
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -37,6 +38,25 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-certificateLog', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-certificateLog') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ // major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ userId: localStorage.login_username,
+ remindType: '',
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/person/list.vue b/src/views/measure/person/list.vue
index 64824df..7017517 100644
--- a/src/views/measure/person/list.vue
+++ b/src/views/measure/person/list.vue
@@ -13,10 +13,11 @@
import type { dictType } from '@/global'
// import type { DeptTreeNode } from '@/views/system/dept/dept-interface'
import { toTreeList } from '@/utils/structure'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const $route = useRoute()
const $router = useRouter()
-const searchQuery = reactive({
+let searchQuery = reactive({
staffNo: '', // 人员编号
name: '', // 姓名
deptId: '', // 工作部门
@@ -27,6 +28,23 @@
offset: 1,
ids: [] as string[],
}) // 查询参数
+
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-person', searchQuery)
+})
+// 重新赋值
+searchQuery = reactive(renewSearchParams('measure-person') || {
+ staffNo: '', // 人员编号
+ name: '', // 姓名
+ deptId: '', // 工作部门
+ major: '', // 计量专业
+ verifierCertificateNo: '', // 证书号
+ certificateStatus: '', // 证书状态
+ limit: 20,
+ offset: 1,
+ ids: [] as string[],
+})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数
const columns = ref([
diff --git a/src/views/measure/price/list.vue b/src/views/measure/price/list.vue
index 094cf2e..69cbdb1 100644
--- a/src/views/measure/price/list.vue
+++ b/src/views/measure/price/list.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import useTemplateDownload from '@/utils/useTemplateDownload'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery = ref({
checkType: '', // 检校类型
@@ -22,6 +23,22 @@
offset: 1, // 页码
limit: 20, // 分页数量
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-price', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-price') || {
+ checkType: '', // 检校类型
+ priceItem: '', // 项目
+ priceName: '', // 价格名称
+ categoryName: '', // 类别名称
+ itemName: '', // 项目名称
+ priceNo: '', // 价格编号
+ priceType: '', // 类别id
+ offset: 1, // 页码
+ limit: 20, // 分页数量
+}
// 表格数据
const list = ref([])
// 总数
@@ -52,9 +69,9 @@
const loadingTable = ref(false)
// 查询列表
const fetchData = (isNowPage = false) => {
- if (!isNowPage) {
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // listQuery.value.offset = 1
+ // }
loadingTable.value = true
getPriceList(listQuery.value).then((response) => {
list.value = response.data.records
@@ -62,7 +79,9 @@
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 多选发生改变时
const handleSelectionChange = (e: any) => {
checkoutList.value = e.map((item: { id: string }) => item.id)
diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue
index 9284df6..9560cba 100644
--- a/src/views/measure/source/components/listApproval.vue
+++ b/src/views/measure/source/components/listApproval.vue
@@ -10,6 +10,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval, submitApproval } from '@/api/approval'
import type { IAddress } from '@/components/AddressSelect/address-interface'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
@@ -50,6 +51,29 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source-list', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source-list') || {
+ approvalStatus: props.status,
+ businessContent: '',
+ companyArea: '', // 区
+ companyCity: '', // 市
+ companyProvince: '', // 省
+ companyCountry: '', // 国家
+ companyAreaName: '', // 区
+ companyCityName: '', // 市
+ companyCountryName: '', // 国家
+ companyProvinceName: '', // 省
+ companyAddress: '',
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ supplierName: '',
+ supplierNo: '',
+ offset: 1,
+ limit: 20,
+}
// 控制是否显示新增页面
const show = ref(true)
// 表格数据
@@ -77,10 +101,10 @@
// 获取数据
const fetchData = (isNowPage: boolean, isReset = false) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalListPage(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: { companyProvinceName: string; companyCityName: string }) => {
return {
diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue
index 39a626b..7efba1b 100644
--- a/src/views/measure/source/list.vue
+++ b/src/views/measure/source/list.vue
@@ -10,6 +10,7 @@
import { exportFile } from '@/utils/exportUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import useTemplateDownload from '@/utils/useTemplateDownload'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
// 查询条件
const listQuery: Ref = ref({
@@ -20,6 +21,19 @@
offset: 1,
limit: 20,
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-source', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-source') || {
+ supplierNo: '', // 业务内容
+ supplierName: '', // 溯源供方名称
+ businessContent: '', // 溯源供方编号
+ formId: SCHEDULE.SUPPLIER_APPROVAL,
+ offset: 1,
+ limit: 20,
+}
// 表格数据
const list = ref([])
const { proxy } = getCurrentInstance() as any
@@ -82,10 +96,10 @@
const loadingTable = ref(false)
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getSoucreList(listQuery.value).then((response) => {
list.value = response.data.rows.map((item: ISupplier) => {
if (item.companyProvinceName && item.companyCityName) {
diff --git a/src/views/measure/train/components/listApproval.vue b/src/views/measure/train/components/listApproval.vue
index 970561c..86b0602 100644
--- a/src/views/measure/train/components/listApproval.vue
+++ b/src/views/measure/train/components/listApproval.vue
@@ -11,6 +11,7 @@
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import { SCHEDULE } from '@/utils/scheduleDict'
import { cancelApproval } from '@/api/approval'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const props = defineProps({
status: {
type: String,
@@ -43,6 +44,24 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-train-plan', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-train-plan') || {
+ approvalStatus: props.status, // 审批状态
+ formId: SCHEDULE.TRAIN_APPROVAL, // 表单id
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ deptId: '', // 部门id
+ director: '', // 负责人
+ effectiveCompany: '', // 实施单位
+ trainEndTime: '', // 培训结束时间
+ trainStartTime: '', // 培训开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
// 筛选时间段数据-创建时间
const createTimeRange = ref<[DateModelType, DateModelType]>(['', ''])
// 筛选时间段数据-培训时间
@@ -77,10 +96,10 @@
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getapprovalList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue
index b167458..3519399 100644
--- a/src/views/measure/train/plan.vue
+++ b/src/views/measure/train/plan.vue
@@ -8,6 +8,7 @@
import { printJSON } from '@/utils/printUtils'
import { SCHEDULE } from '@/utils/scheduleDict'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const listQuery = ref({
createEndTime: '', // 创建结束时间
createStartTime: '', // 创建开始时间
@@ -21,6 +22,24 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-plan', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-plan') || {
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ deptId: '', // 部门id
+ director: '', // 负责人
+ effectiveCompany: '', // 实施单位
+ ids: [], // 导出数组
+ trainEndTime: '', // 培训结束时间
+ formId: SCHEDULE.TRAIN_APPROVAL, // 表单id
+ trainStartTime: '', // 培训开始时间
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
const checkoutList = ref([])
const list = ref([])
const total = ref(0)
@@ -37,17 +56,19 @@
// 获取数据
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getPlanList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
const { proxy } = getCurrentInstance() as any
// 表头
const columns = ref([
diff --git a/src/views/measure/train/trainLog.vue b/src/views/measure/train/trainLog.vue
index 049f38c..1ed652d 100644
--- a/src/views/measure/train/trainLog.vue
+++ b/src/views/measure/train/trainLog.vue
@@ -10,6 +10,7 @@
import { printJSON } from '@/utils/printUtils'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { exportFile } from '@/utils/exportUtils'
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const listQuery = ref({
createEndTime: '', // 创建结束时间
createStartTime: '', // 创建开始时间
@@ -20,6 +21,21 @@
offset: 1, // 当前页
limit: 20, // 每页多少条
})
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'measure-trainLog', listQuery.value)
+})
+// 重新赋值
+listQuery.value = renewSearchParams('measure-trainLog') || {
+ createEndTime: '', // 创建结束时间
+ createStartTime: '', // 创建开始时间
+ logNo: '', // 记录编号
+ trainStartTime: '', // 培训开始时间
+ trainEndTime: '', // 培训结束时间
+ trainName: '', // 培训名称
+ offset: 1, // 当前页
+ limit: 20, // 每页多少条
+}
const checkoutList = ref([])
const list = ref([])
const total = ref(0)
@@ -37,17 +53,19 @@
const $router = useRouter()
const fetchData = (isNowPage: boolean) => {
loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.value.offset = 1
+ // }
getLogList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
})
}
-fetchData(true)
+onMounted(() => {
+ fetchData(true)
+})
// 表头
const columns = ref([
diff --git a/src/views/measure/train/trainLogAdd.vue b/src/views/measure/train/trainLogAdd.vue
index 5d9aac5..471d222 100644
--- a/src/views/measure/train/trainLogAdd.vue
+++ b/src/views/measure/train/trainLogAdd.vue
@@ -50,6 +50,7 @@
trainStaffList: [], // 培训人员列表
trainTime: '', // 培训时间
})
+
const trainList = ref([]) // 人员信息列表数据
// 表头
const columns = ref([
diff --git a/src/views/system/process/process.vue b/src/views/system/process/process.vue
index eab9f8a..4bbb98d 100644
--- a/src/views/system/process/process.vue
+++ b/src/views/system/process/process.vue
@@ -8,10 +8,10 @@
import { exportFile } from '@/utils/exportUtils'
import { printJSON } from '@/utils/printUtils'
import { getDictByCode } from '@/api/system/dict'
-
+import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery'
const { proxy } = getCurrentInstance() as any
const businessList = ref([]) // 关联业务列表
-const listQuery = reactive({
+let listQuery = reactive({
deploymentId: '', // 流程部署id
suspensionState: '', // 状态流程 1激活 2废止
number: '', // 编号
@@ -50,14 +50,31 @@
const total = ref(20)
const listLoading = ref(false)
const checkoutList = ref([]) // 多选选中结果
-
+// 页面跳转之前保存参数
+onBeforeRouteLeave((to: any) => {
+ keepSearchParams(to.path, 'system-process', listQuery)
+})
+// 重新赋值
+listQuery = reactive(renewSearchParams('system-process') || {
+ deploymentId: '', // 流程部署id
+ suspensionState: '', // 状态流程 1激活 2废止
+ number: '', // 编号
+ name: '', // 名称
+ business: '', // 关联业务
+ person: '', // 负责人
+ beginTime: '', // 开始时间
+ endTime: '', // 结束时间
+ status: '', // 当前流程状态,
+ offset: 1,
+ limit: 20,
+})
// 获取流程列表
const fetchData = async (isNowPage: boolean) => {
listLoading.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.offset = 1
- }
+ // if (!isNowPage) {
+ // // 是否显示当前页,否则跳转第一页
+ // listQuery.offset = 1
+ // }
const param = {
category: '', // 流程分类
deploymentStartTime: listQuery.beginTime, // 开始时间
@@ -89,8 +106,6 @@
listLoading.value = false
}
-fetchData(true)
-
// 查询数据
const search = () => {
fetchData(false)
@@ -121,6 +136,7 @@
}
const $router = useRouter()
+
// 点击编辑/详情
const handleEdit = (row: IlistQuery, pageType: 'edit' | 'detail') => {
$router.push({ path: `/process/${pageType}`, query: { rowData: JSON.stringify(row) } })
@@ -225,9 +241,9 @@
businessList.value = res.data
})
}
-
onMounted(() => {
fetchBusinessList()
+ fetchData(true)
})