diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/examineAndApprove.vue b/src/views/measure/source/components/examineAndApprove.vue deleted file mode 100644 index c13f95a..0000000 --- a/src/views/measure/source/components/examineAndApprove.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/examineAndApprove.vue b/src/views/measure/source/components/examineAndApprove.vue deleted file mode 100644 index c13f95a..0000000 --- a/src/views/measure/source/components/examineAndApprove.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue new file mode 100644 index 0000000..3880028 --- /dev/null +++ b/src/views/measure/source/components/listApproval.vue @@ -0,0 +1,332 @@ + + + + diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/examineAndApprove.vue b/src/views/measure/source/components/examineAndApprove.vue deleted file mode 100644 index c13f95a..0000000 --- a/src/views/measure/source/components/examineAndApprove.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue new file mode 100644 index 0000000..3880028 --- /dev/null +++ b/src/views/measure/source/components/listApproval.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue deleted file mode 100644 index 1cc883e..0000000 --- a/src/views/measure/source/components/listPage.vue +++ /dev/null @@ -1,374 +0,0 @@ - - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/examineAndApprove.vue b/src/views/measure/source/components/examineAndApprove.vue deleted file mode 100644 index c13f95a..0000000 --- a/src/views/measure/source/components/examineAndApprove.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue new file mode 100644 index 0000000..3880028 --- /dev/null +++ b/src/views/measure/source/components/listApproval.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue deleted file mode 100644 index 1cc883e..0000000 --- a/src/views/measure/source/components/listPage.vue +++ /dev/null @@ -1,374 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listPageAdd.vue b/src/views/measure/source/components/listPageAdd.vue deleted file mode 100644 index 289b3e4..0000000 --- a/src/views/measure/source/components/listPageAdd.vue +++ /dev/null @@ -1,729 +0,0 @@ - - - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/examineAndApprove.vue b/src/views/measure/source/components/examineAndApprove.vue deleted file mode 100644 index c13f95a..0000000 --- a/src/views/measure/source/components/examineAndApprove.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue new file mode 100644 index 0000000..3880028 --- /dev/null +++ b/src/views/measure/source/components/listApproval.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue deleted file mode 100644 index 1cc883e..0000000 --- a/src/views/measure/source/components/listPage.vue +++ /dev/null @@ -1,374 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listPageAdd.vue b/src/views/measure/source/components/listPageAdd.vue deleted file mode 100644 index 289b3e4..0000000 --- a/src/views/measure/source/components/listPageAdd.vue +++ /dev/null @@ -1,729 +0,0 @@ - - - - - diff --git a/src/views/measure/source/components/manageBox.vue b/src/views/measure/source/components/manageBox.vue deleted file mode 100644 index c5ced8f..0000000 --- a/src/views/measure/source/components/manageBox.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/examineAndApprove.vue b/src/views/measure/source/components/examineAndApprove.vue deleted file mode 100644 index c13f95a..0000000 --- a/src/views/measure/source/components/examineAndApprove.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue new file mode 100644 index 0000000..3880028 --- /dev/null +++ b/src/views/measure/source/components/listApproval.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue deleted file mode 100644 index 1cc883e..0000000 --- a/src/views/measure/source/components/listPage.vue +++ /dev/null @@ -1,374 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listPageAdd.vue b/src/views/measure/source/components/listPageAdd.vue deleted file mode 100644 index 289b3e4..0000000 --- a/src/views/measure/source/components/listPageAdd.vue +++ /dev/null @@ -1,729 +0,0 @@ - - - - - diff --git a/src/views/measure/source/components/manageBox.vue b/src/views/measure/source/components/manageBox.vue deleted file mode 100644 index c5ced8f..0000000 --- a/src/views/measure/source/components/manageBox.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/src/views/measure/source/components/notPass.vue b/src/views/measure/source/components/notPass.vue deleted file mode 100644 index 5a4b817..0000000 --- a/src/views/measure/source/components/notPass.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/examineAndApprove.vue b/src/views/measure/source/components/examineAndApprove.vue deleted file mode 100644 index c13f95a..0000000 --- a/src/views/measure/source/components/examineAndApprove.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue new file mode 100644 index 0000000..3880028 --- /dev/null +++ b/src/views/measure/source/components/listApproval.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue deleted file mode 100644 index 1cc883e..0000000 --- a/src/views/measure/source/components/listPage.vue +++ /dev/null @@ -1,374 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listPageAdd.vue b/src/views/measure/source/components/listPageAdd.vue deleted file mode 100644 index 289b3e4..0000000 --- a/src/views/measure/source/components/listPageAdd.vue +++ /dev/null @@ -1,729 +0,0 @@ - - - - - diff --git a/src/views/measure/source/components/manageBox.vue b/src/views/measure/source/components/manageBox.vue deleted file mode 100644 index c5ced8f..0000000 --- a/src/views/measure/source/components/manageBox.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/src/views/measure/source/components/notPass.vue b/src/views/measure/source/components/notPass.vue deleted file mode 100644 index 5a4b817..0000000 --- a/src/views/measure/source/components/notPass.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/passed.vue b/src/views/measure/source/components/passed.vue deleted file mode 100644 index 31cd21c..0000000 --- a/src/views/measure/source/components/passed.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/examineAndApprove.vue b/src/views/measure/source/components/examineAndApprove.vue deleted file mode 100644 index c13f95a..0000000 --- a/src/views/measure/source/components/examineAndApprove.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue new file mode 100644 index 0000000..3880028 --- /dev/null +++ b/src/views/measure/source/components/listApproval.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue deleted file mode 100644 index 1cc883e..0000000 --- a/src/views/measure/source/components/listPage.vue +++ /dev/null @@ -1,374 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listPageAdd.vue b/src/views/measure/source/components/listPageAdd.vue deleted file mode 100644 index 289b3e4..0000000 --- a/src/views/measure/source/components/listPageAdd.vue +++ /dev/null @@ -1,729 +0,0 @@ - - - - - diff --git a/src/views/measure/source/components/manageBox.vue b/src/views/measure/source/components/manageBox.vue deleted file mode 100644 index c5ced8f..0000000 --- a/src/views/measure/source/components/manageBox.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/src/views/measure/source/components/notPass.vue b/src/views/measure/source/components/notPass.vue deleted file mode 100644 index 5a4b817..0000000 --- a/src/views/measure/source/components/notPass.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/passed.vue b/src/views/measure/source/components/passed.vue deleted file mode 100644 index 31cd21c..0000000 --- a/src/views/measure/source/components/passed.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue new file mode 100644 index 0000000..7b0fc62 --- /dev/null +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -0,0 +1,345 @@ + + + + + diff --git a/package.json b/package.json index 3a8ab01..f09aaa1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", "pinia": "^2.0.23", + "print-js": "^1.6.0", "qrcode": "^1.5.1", "qs": "^6.11.0", "tinymce": "^6.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d7d6ec..f1b9176 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ pinia: ^2.0.23 plop: ^3.1.1 postcss-html: ^1.5.0 + print-js: ^1.6.0 qrcode: ^1.5.1 qs: ^6.11.0 sass: ^1.56.1 @@ -94,6 +95,7 @@ path-browserify: 1.0.1 path-to-regexp: 6.2.1 pinia: 2.0.23_d45o5shxrtvj6wh4y524t7cqnm + print-js: registry.npmmirror.com/print-js/1.6.0 qrcode: registry.npmmirror.com/qrcode/1.5.1 qs: 6.11.0 tinymce: 6.2.0 @@ -8769,6 +8771,12 @@ engines: {node: '>=10.13.0'} dev: false + registry.npmmirror.com/print-js/1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz} + name: print-js + version: 1.6.0 + dev: false + registry.npmmirror.com/qrcode/1.5.1: resolution: {integrity: sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz} name: qrcode diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts new file mode 100644 index 0000000..e447f41 --- /dev/null +++ b/src/api/measure/source.ts @@ -0,0 +1,84 @@ +/** + * 溯源供方请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 列表查询 +export function getSoucreList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function getSoucreListDelete(data: object) { + return request({ + url: `${prefix}/supplier/delete`, + method: 'post', + data, + }) +} + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/sys/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 提交数据 +export function sourceSubmit(data: object) { + return request({ + url: '/meter/supplier/submit', + method: 'post', + data, + }) +} +// 保存数据 +export function sourceSave(data: object) { + return request({ + url: `${prefix}/supplier/save`, + method: 'post', + data, + }) +} +// 更新数据 +export function getSoucreLisUpdate(data: object) { + return request({ + url: `${prefix}/supplier/update`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSourceList(data: { businessContent: string; supplierName: string; supplierNo: string; ids: string[] }) { + return request({ + url: `${prefix}/supplier/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 溯源供方审批接口 +export function getapprovalListPage(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts deleted file mode 100644 index 93f5f12..0000000 --- a/src/api/system/source.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 溯源供方请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 列表查询 -export function getSoucreList(data: object) { - return request({ - url: `${prefix}/supplier/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} - -// 数据删除 -export function getSoucreListDelete(data: object) { - return request({ - url: `${prefix}/supplier/delete`, - method: 'post', - data, - }) -} - -// 查看详情 -export function getSoucreListDetail(data: object) { - return request({ - url: `${prefix}/supplier/detail`, - method: 'post', - data, - }) -} - -// 省级联动 -export function getSoucreListlevelType(pid: string) { - return request({ - url: `/sys/area/list?pid=${pid}`, - method: 'get', - }) -} - -// 新增数据 -export function getSoucreListAdd(data: object) { - return request({ - url: `${prefix}/supplier/add`, - method: 'post', - data, - }) -} -// 更新数据 -export function getSoucreLisUpdate(data: object) { - return request({ - url: `${prefix}/supplier/update`, - method: 'post', - data, - }) -} - -// 导出详情 -export function getSoucreLisListExport(data: object) { - return request({ - url: `${prefix}/supplier/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 溯源供方审批接口 -export function getapprovalListPage(data: object) { - return request({ - url: `${prefix}/supplier/approval/listPage?offset=${data.offset}&limit=${data.limit}`, - method: 'post', - data, - }) -} diff --git a/src/assets/styles/globals.scss b/src/assets/styles/globals.scss index 0ea0555..8960267 100644 --- a/src/assets/styles/globals.scss +++ b/src/assets/styles/globals.scss @@ -122,3 +122,17 @@ .full-width-input { width: 100% !important; } + +// 详情页面输入框样式调整, 背景白,字体加深,悬停显示输入字符 +.detail-input.is-disabled .el-input__wrapper { + background-color: #fff; +} + +.detail-input.is-disabled .el-input__inner { + color: var(--el-text-color-regular); + -webkit-text-fill-color: var(--el-text-color-regular); + + &:hover { + cursor: text; + } +} diff --git a/src/components.d.ts b/src/components.d.ts index 280906e..d419887 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -55,7 +55,6 @@ SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectResult: typeof import('./components/workFlow/selectResult.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] - SelectTree: typeof import('./components/SelectTree/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] diff --git a/src/components/QrDialog/index.vue b/src/components/QrDialog/index.vue index 317927e..defb488 100644 --- a/src/components/QrDialog/index.vue +++ b/src/components/QrDialog/index.vue @@ -128,6 +128,9 @@ font-weight: bold; font-size: 30px; margin-top: 60px; + display: block; + height: auto; + overflow: hidden; .canvas { width: 50vw; diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f114ca2..73a7470 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -423,7 +423,7 @@ { path: 'approve/:type/:id?', name: 'ListpageSourceAdd', - component: () => import('@/views/measure/source/components/listPageAdd.vue'), + component: () => import('@/views/measure/source/components/sourceApprovalDetail.vue'), meta: { title: '溯源供方审批', icon: 'ep:key', diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 7de3b8b..0719c75 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -6,6 +6,15 @@ state: () => ({ allDeptList: [] as DeptTreeNode[], // 所有部门列表 companyList: [] as DeptTreeNode[], // 公司列表 + approvalStatusList: { + 全部: '0', + 草稿箱: '1', + 待审批: '2', + 审批中: '3', + 已通过: '4', + 未通过: '5', + 已取消: '6', + }, // 审批状态 }), getters: { getAllDeptList: (state) => { @@ -14,6 +23,9 @@ getCompanyList: (state) => { return state.companyList }, + getApprovalStatus: (state) => { + return state.approvalStatusList + }, }, actions: { setAllDeptList(list: DeptTreeNode[]) { diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts new file mode 100644 index 0000000..8c71409 --- /dev/null +++ b/src/utils/printUtils.ts @@ -0,0 +1,53 @@ +import printJS from 'print-js' +// JSON表头配置项 +interface IJsonPropertie { + field: string // 字段名 + displayName: string // 要显示的中文名 + columnSize?: string // 列宽度,非必填 +} +/** + * 打印HTML元素 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printHtml(element: string, header?: string, style?: string, ignoreElements?: string[]) { + printJS({ + printable: element, // 标签元素id + type: 'html', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + ignoreElements: ignoreElements || [], // 传入打印父 html 元素时应忽略的 html id 数组。使其不打印。 + }) +} + +export function printJSON(jsonData: Array | Object, properties: IJsonPropertie[], header?: string, style?: string, gridHeaderStyle?: string, gridStyle?: string) { + printJS({ + printable: jsonData, // json 数据对象 + type: 'json', + properties, + header: `

${header}

`, // '表单', + style: style || '', // 可选-打印时去掉眉页眉尾 + gridHeaderStyle: gridHeaderStyle || 'border: 1px solid #000;text-align:center', + gridStyle: gridStyle || 'border: 1px solid #000;text-align:center', + }) +} + +/** + * 打印图片 + * @param element 元素id + * @param header 打印标题 + * @param style 打印样式 + * @param ignoreElements 忽略元素id列表 + */ +export function printImage(image: string, header?: string, style?: string) { + printJS({ + printable: image, // 标签元素id + type: 'image', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 21d3721..9db0c6b 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -2,19 +2,19 @@ * 流程字典, 流程代号:流程id */ export enum SCHEDULE { - FILE_APPROVAL = '1', // 文件审批, - TRAIN_APPROVAL = '2', // 培训计划审批 - SUPPLIER_APPROVAL = '3', // 溯源供方审批 - STANDARD_CHANGE_APPROVAL = '4', // 标准装置更换申请 - STANDARD_PAUSE_APPROVAL = '5', // 标准装置暂停申请 - STANDARD_REVERT_APPROVAL = '6', // 标准装置撤销申请 - STANDARD_RESUME_APPROVAL = '7', // 标准装置恢复申请 - STANDARD_CHECK_APPROVAL = '8', // 标准装置复查申请 - DEVICE_UNUSED_APPROVAL = '9', // 设备闲置申请 - DEVICE_SEALED_APPROVAL = '10', // 设备封存申请 - DEVICE_UNSEALED_APPROVAL = '11', // 设备启封申请 - DEVICE_SCRAPPED_ROVAL = '12', // 设备报废申请 - DEVICE_HANDLE_APPROVAL = '13', // 设备处置申请 - DEVICE_CONSUMING_APPROVAL = '14', // 设备领用申请 - DEVICE_BORROW_APPROVAL = '15', // 设备借用申请 + FILE_APPROVAL = 'jlglwjsp', // 文件审批, + TRAIN_APPROVAL = 'jlglpxjhsp', // 培训计划审批 + SUPPLIER_APPROVAL = 'jlglsygfsp', // 溯源供方审批 + STANDARD_CHANGE_APPROVAL = 'sbglbzzzghsq', // 标准装置更换申请 + STANDARD_PAUSE_APPROVAL = 'sbglbzzzghsq', // 标准装置暂停申请 + STANDARD_REVERT_APPROVAL = 'sbglbzzzghsq', // 标准装置撤销申请 + STANDARD_RESUME_APPROVAL = 'sbglbzzzghsq', // 标准装置恢复申请 + STANDARD_CHECK_APPROVAL = 'sbglbzzzfcsq', // 标准装置复查申请 + DEVICE_UNUSED_APPROVAL = 'sbglsbxzsq', // 设备闲置申请 + DEVICE_SEALED_APPROVAL = 'sbglsbfcsq', // 设备封存申请 + DEVICE_UNSEALED_APPROVAL = 'sbglsbqfsq', // 设备启封申请 + DEVICE_SCRAPPED_ROVAL = 'sbglsbbfsq', // 设备报废申请 + DEVICE_HANDLE_APPROVAL = 'sbglsbczsq', // 设备处置申请 + DEVICE_CONSUMING_APPROVAL = 'sbglsblysq', // 设备领用申请 + DEVICE_BORROW_APPROVAL = 'sbglsbjysq', // 设备借用申请 } diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue index 478f4fb..d269b33 100644 --- a/src/views/device/deviceMaintenance/components/listApply/listPage.vue +++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue @@ -3,7 +3,7 @@ import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IlistQuery, IlistType } from '../list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import { getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' const props = defineProps({ diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 6227626..9ac8eea 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -1,52 +1,88 @@ - @@ -55,8 +91,8 @@ position: relative; .btns { - position: fixed; - top: 76px; + position: absolute; + top: -41px; right: 15px; z-index: 999; } diff --git a/src/views/measure/source/components/all.vue b/src/views/measure/source/components/all.vue deleted file mode 100644 index d124307..0000000 --- a/src/views/measure/source/components/all.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/approvalPending.vue b/src/views/measure/source/components/approvalPending.vue deleted file mode 100644 index 8a7a8bc..0000000 --- a/src/views/measure/source/components/approvalPending.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue new file mode 100644 index 0000000..7e67094 --- /dev/null +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -0,0 +1,309 @@ + + + + diff --git a/src/views/measure/source/components/canceled.vue b/src/views/measure/source/components/canceled.vue deleted file mode 100644 index 3b9657c..0000000 --- a/src/views/measure/source/components/canceled.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/draftBox.vue b/src/views/measure/source/components/draftBox.vue deleted file mode 100644 index 43d7b75..0000000 --- a/src/views/measure/source/components/draftBox.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/examineAndApprove.vue b/src/views/measure/source/components/examineAndApprove.vue deleted file mode 100644 index c13f95a..0000000 --- a/src/views/measure/source/components/examineAndApprove.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue new file mode 100644 index 0000000..3880028 --- /dev/null +++ b/src/views/measure/source/components/listApproval.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/views/measure/source/components/listPage.vue b/src/views/measure/source/components/listPage.vue deleted file mode 100644 index 1cc883e..0000000 --- a/src/views/measure/source/components/listPage.vue +++ /dev/null @@ -1,374 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/listPageAdd.vue b/src/views/measure/source/components/listPageAdd.vue deleted file mode 100644 index 289b3e4..0000000 --- a/src/views/measure/source/components/listPageAdd.vue +++ /dev/null @@ -1,729 +0,0 @@ - - - - - diff --git a/src/views/measure/source/components/manageBox.vue b/src/views/measure/source/components/manageBox.vue deleted file mode 100644 index c5ced8f..0000000 --- a/src/views/measure/source/components/manageBox.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/src/views/measure/source/components/notPass.vue b/src/views/measure/source/components/notPass.vue deleted file mode 100644 index 5a4b817..0000000 --- a/src/views/measure/source/components/notPass.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/passed.vue b/src/views/measure/source/components/passed.vue deleted file mode 100644 index 31cd21c..0000000 --- a/src/views/measure/source/components/passed.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue new file mode 100644 index 0000000..7b0fc62 --- /dev/null +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -0,0 +1,345 @@ + + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index fe9cf57..846a74c 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -2,10 +2,13 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IlistQuery, IlistType } from './list_interface' -import { getSoucreList, getSoucreListDelete } from '@/api/system/source' +import type { ISupplier, IlistQuery, IlistType } from './list_interface' +import type { TableColumn } from '@/components/NormalTable/table_interface' +import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' import { exportExcel } from '@/utils/exportXlsx' +import { printJSON } from '@/utils/printUtils' +import { exportFile } from '@/utils/exportUtils' // 查询条件 const listQuery: Ref = ref({ supplierNo: '', // 业务内容 @@ -17,12 +20,12 @@ // 控制是否显示新增页面 const show = ref(true) // 表格数据 -const list = ref([]) +const list = ref([]) const { proxy } = getCurrentInstance() as any // 总数 const total = ref(0) // 表头 -const columns = ref([ +const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', @@ -41,8 +44,8 @@ align: 'center', }, { - text: '业务资质', - value: 'briefName', + text: '公司业务范围', + value: 'businessScope', align: 'center', }, { @@ -57,14 +60,14 @@ }, { text: '地址', - value: 'companyCity', + value: 'briefName', align: 'center', }, { text: '创建时间', value: 'createTime', align: 'center', - width: '200', + width: '180px', }, { text: '备注', @@ -74,7 +77,7 @@ ]) // 选中的内容 -const checkoutList = ref([]) +const checkoutList = ref([]) // 文件上传input const fileRef = ref() // 删除id @@ -91,7 +94,15 @@ listQuery.value.offset = 1 } getSoucreList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: ISupplier) => { + if (item.companyProvince && item.companyCity) { + item.briefName = `${item.companyProvince}/${item.companyCity}` + } + else { + item.briefName = item.companyProvince || item.companyCity + } + return item + }) total.value = parseInt(response.data.total) loadingTable.value = false }) @@ -99,7 +110,7 @@ fetchData(true) // 多选发生改变时 const handleSelectionChange = (e: any) => { - checkoutList.value = e + checkoutList.value = e.map((item: { id: string }) => item.id) } // 点击编辑id和删除row类型 interface rowReturn { @@ -151,34 +162,7 @@ limit: 20, } } -// 导出 -const exportExcelBtn = () => { - const loading = ElLoading.service({ - lock: true, - text: 'Loading', - background: 'rgba(255, 255, 255, 0.8)', - }) - if (checkoutList.value.length <= 0 && list.value.length > 0) { - exportExcel({ - json: list.value.map((item: IlistType, index: number) => ({ index: index + 1, supplierNo: item.supplierNo, supplierName: item.supplierName, businessContent: item.businessContent, briefName: item.briefName, director: item.director, mobile: item.mobile, companyCity: item.companyCity, createTime: item.createTime, remark: item.remark })), - name: '溯源供方', - titleArr: ['序号', '溯源供方编号', '溯源供方名称', '业务内容', '业务资质', '负责人', '联系方式', '地址', '创建时间', '备注'], - sheetName: 'sheet1', - }) - } - else if (checkoutList.value.length > 0) { - exportExcel({ - json: checkoutList.value.map((item: IlistType, index: number) => ({ index: index + 1, supplierNo: item.supplierNo, supplierName: item.supplierName, businessContent: item.businessContent, briefName: item.briefName, director: item.director, mobile: item.mobile, companyCity: item.companyCity, createTime: item.createTime, remark: item.remark })), - name: '溯源供方', - titleArr: ['序号', '溯源供方编号', '溯源供方名称', '业务内容', '业务资质', '负责人', '联系方式', '地址', '创建时间', '备注'], - sheetName: 'sheet1', - }) - } - else { - ElMessage.warning('暂无数据') - } - loading.close() -} + // 上传文件/批量导入 const onFileChange = (event: any) => { if (event.target.files[0].type === 'application/pdf') { @@ -210,27 +194,60 @@ } fetchData(true) } -const upload = () => { + +// 批量导入 +const uploadAll = () => { + // todo: 批量导入 fileRef.value.click() } -const uploadAll = () => { - upload() -} +// 添加溯源供方 const add = () => { $router.push('/source/add') } const exportAll = () => { - exportExcelBtn() + const loading = ElLoading.service({ + lock: true, + text: '下载中请稍后', + background: 'rgba(255, 255, 255, 0.8)', + }) + if (list.value.length > 0) { + const params = { + supplierNo: '', // 业务内容 + supplierName: '', // 溯源供方名称 + businessContent: '', // 溯源供方编号 + ids: checkoutList.value, + } + exportSourceList(params).then((res) => { + const blob = new Blob([res.data]) + exportFile(blob, '溯源供方列表.xlsx') + }) + } + else { + ElMessage.warning('无数据可导出数据') + } + loading.close() } -// 打印 -const printObj = ref({ - id: 'print', // 需要打印元素的id - popTitle: '溯源供方编号模板', // 打印配置页上方的标题 - extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割 - preview: false, // 是否启动预览模式,默认是false - standard: '', - extarCss: '', -}) + +// 打印列表 +function printList() { + // 打印列 + const properties = columns.value.map((item) => { + return { + field: item.value, + displayName: item.text, + } + }) + if (checkoutList.value.length <= 0 && list.value.length > 0) { + printJSON(list.value, properties, '溯源供方列表') + } + else if (checkoutList.value.length > 0) { + const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + printJSON(printList, properties, '溯源供方列表') + } + else { + ElMessage('无可打印内容') + } +}