init
commit
e1ace876ba
|
|
@ -0,0 +1,13 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# production
|
||||
/dist
|
||||
/demo
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.idea
|
||||
yarn.lock
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"prettier.enable": false,
|
||||
"editor.formatOnSave": false,
|
||||
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.organizeImports": "never"
|
||||
},
|
||||
|
||||
"eslint.rules.customizations": [
|
||||
{ "rule": "style/*", "severity": "off", "fixable": true },
|
||||
{ "rule": "format/*", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-order", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
||||
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
||||
{ "rule": "*semi", "severity": "off", "fixable": true }
|
||||
],
|
||||
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"vue",
|
||||
"html",
|
||||
"markdown",
|
||||
"json",
|
||||
"json5",
|
||||
"jsonc",
|
||||
"yaml",
|
||||
"toml",
|
||||
"xml",
|
||||
"gql",
|
||||
"graphql",
|
||||
"astro",
|
||||
"svelte",
|
||||
"css",
|
||||
"less",
|
||||
"scss",
|
||||
"pcss",
|
||||
"postcss"
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
# 微应用模板说明文档
|
||||
|
||||
## 在线文档
|
||||
|
||||
https://www.yuque.com/buhangjiecheshen-ymbtb/qc0093/gxdun1dphetcurko
|
||||
|
||||
|
||||
## 安装依赖
|
||||
项目依赖可通过 **yarn** 或 **npm** 进行安装:
|
||||
|
||||
```bash
|
||||
# 使用 yarn
|
||||
yarn
|
||||
|
||||
# 或使用 npm
|
||||
npm i
|
||||
```
|
||||
|
||||
## 开发服务&打包应用
|
||||
|
||||
```bash
|
||||
# 启动开发服务
|
||||
yarn serve:<env>
|
||||
# 或
|
||||
npm run serve:<env>
|
||||
|
||||
# 开发环境打包
|
||||
yarn build:<env>
|
||||
# 或
|
||||
npm run build:<env>
|
||||
```
|
||||
|
||||
## 路由配置&路由访问&自动化路由
|
||||
所有页面必须放在`src/pages/container`目录下,启动访问页面请在浏览器地址栏输入`/<appIdentifier>/container/<你的路由页面文件名称>`
|
||||
解释:
|
||||
1. 所有页面组件命名为`index.js`或`index.jsx`,必须放在一个首字母大写的文件中。
|
||||
2. `container`为固定路径访问格式
|
||||
3. `<appIdentifier>`为应用的唯一标识符,也是应用路由的`basename`,在底座中用于区分其他应用。可在根目录 `jjb.config.js` 文件的 `appIdentifier` 节点中进行修改。
|
||||
4. 自动化路由将根据`pages/container`中的路由页面文件自动生成路由树。
|
||||
5. `id`匹配路由,文件夹命名`_id`
|
||||
|
||||
## 应用接口环境配置
|
||||
应用接口环境相关配置在根目录 `jjb.config.js` 文件的 `environment` 节点中进行定义。
|
||||
|
||||
## 应用开发服务配置
|
||||
应用开发服务相关配置在根目录 `jjb.config.js` 文件的 `server` 节点中进行定义。
|
||||
|
||||
## Babel 配置
|
||||
应用的 `Babel` 配置在根目录 `jjb.babel.js` 文件中进行管理。
|
||||
|
||||
## 目录说明
|
||||
|
||||
1. `src/api/` 配置各个 store 模块的接口数据。
|
||||
2. `src/components/` 全局公共组件。
|
||||
3. `src/enumerate/` 全局各种枚举配置。
|
||||
4. `src/pages/` 页面文件目录。
|
||||
5. `src/main.js` 应用的入口文件。
|
||||
|
||||
## 核心依赖
|
||||
1. `@cqsjjb/jjb-common-decorator`
|
||||
1. 公共装饰器库,内部包含:
|
||||
1. 按钮权限处理
|
||||
2. antd/Table 控制
|
||||
3. 文本重命名处理
|
||||
4. 具体使用方式可参考各个模块的 `d.ts`。
|
||||
2. `@cqsjjb/jjb-common-lib`
|
||||
1. 公共工具库,具体 API 使用请查看 `d.ts`
|
||||
3. `@cqsjjb/jjb-dva-runtime`
|
||||
1. 核心运行时,基于 `dvajs` 实现。
|
||||
1. 应用核心依赖模块
|
||||
2. 应用的自动化路由
|
||||
3. `store` 模块接口数据处理
|
||||
4. 均基于此依赖实现,具体使用方式请查看 `d.ts`。
|
||||
4. `@cqsjjb/jjb-react-admin-component`
|
||||
1. 公共组件库,具体组件使用方式请查看 `d.ts`。
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
_ooOoo_
|
||||
o8888888o
|
||||
88" . "88
|
||||
(| -_- |)
|
||||
O\ = /O
|
||||
____/`---'\____
|
||||
. ' \\| |// `.
|
||||
/ \\||| : |||// \
|
||||
/ _||||| -:- |||||- \
|
||||
| | \\\ - /// | |
|
||||
| \_| ''\---/'' | |
|
||||
\ .-\__ `-` ___/-. /
|
||||
___`. .' /--.--\ `. . __
|
||||
."" '< `.___\_<|>_/___.' >'"".
|
||||
| | : `- \`.;`\ _ /`;.`/ - ` : | |
|
||||
\ \ `-. \_ __\ /__ _/ .-` / /
|
||||
======`-.____`-.___\_____/___.-`____.-'======
|
||||
`=---='
|
||||
|
||||
.............................................
|
||||
佛祖保佑 永无BUG
|
||||
佛曰:
|
||||
写字楼里写字间,写字间里程序员;
|
||||
程序人员写程序,又拿程序换酒钱。
|
||||
酒醒只在网上坐,酒醉还来网下眠;
|
||||
酒醉酒醒日复日,网上网下年复年。
|
||||
但愿老死电脑间,不愿鞠躬老板前;
|
||||
奔驰宝马贵者趣,公交自行程序员。
|
||||
别人笑我忒疯癫,我笑自己命太贱;
|
||||
不见满街漂亮妹,哪个归得程序员?
|
||||
*/
|
||||
|
||||
const blessedByBuddha
|
||||
= "%c _ooOoo_\n"
|
||||
+ " o8888888o\n"
|
||||
+ " 88\" . \"88\n"
|
||||
+ " (| -_- |)\n"
|
||||
+ " O\\ = /O\n"
|
||||
+ " ____/`---'\\____\n"
|
||||
+ " . ' \\\\| |// `.\n"
|
||||
+ " / \\\\||| : |||// \\\n"
|
||||
+ " / _||||| -:- |||||- \\\n"
|
||||
+ " | | \\\\\\ - /// | |\n"
|
||||
+ " | \\_| ''\\---/'' | |\n"
|
||||
+ " \\ .-\\__ `-` ___/-. /\n"
|
||||
+ " ___`. .' /--.--\\ `. . __\n"
|
||||
+ " .\"\" '< `.___\\_<|>_/___.' >'\"\".\n"
|
||||
+ " | | : `- \\`.;`\\ _ /`;.`/ - ` : | |\n"
|
||||
+ " \\ \\ `-. \\_ __\\ /__ _/ .-` / /\n"
|
||||
+ " ======`-.____`-.___\\_____/___.-`____.-'======\n"
|
||||
+ " `=---='\n"
|
||||
+ "\n"
|
||||
+ "%c .............................................\n"
|
||||
+ " 佛祖保佑 永无BUG\n"
|
||||
+ "\n"
|
||||
+ "%c 佛曰:\n"
|
||||
+ " 写字楼里写字间,写字间里程序员;\n"
|
||||
+ " 程序人员写程序,又拿程序换酒钱。\n"
|
||||
+ " 酒醒只在网上坐,酒醉还来网下眠;\n"
|
||||
+ " 酒醉酒醒日复日,网上网下年复年。\n"
|
||||
+ " 但愿老死电脑间,不愿鞠躬老板前;\n"
|
||||
+ " 奔驰宝马贵者趣,公交自行程序员。\n"
|
||||
+ " 别人笑我忒疯癫,我笑自己命太贱;\n"
|
||||
+ " 不见满街漂亮妹,哪个归得程序员?";
|
||||
console.log(blessedByBuddha, "color:#ffd700", "color:red", "color:#1e80ff");
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
import antfu from "@antfu/eslint-config";
|
||||
|
||||
export default antfu({
|
||||
formatters: {
|
||||
html: false,
|
||||
css: true,
|
||||
},
|
||||
test: false,
|
||||
typescript: true,
|
||||
react: true,
|
||||
vue: false,
|
||||
markdown: false,
|
||||
stylistic: {
|
||||
semi: true,
|
||||
quotes: "double",
|
||||
},
|
||||
overrides: {
|
||||
react: {
|
||||
"react/no-comment-textnodes": "off",
|
||||
"react-hooks-extra/no-unnecessary-use-prefix": "off",
|
||||
"react-hooks-extra/prefer-use-state-lazy-initialization": "off",
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
},
|
||||
javascript: {
|
||||
"no-console": process.env.NODE_ENV === "production" ? "error" : "warn",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "warn",
|
||||
"no-alert": process.env.NODE_ENV === "production" ? "error" : "warn",
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
{
|
||||
selector: "VariableDeclarator[id.name='pd']",
|
||||
message: "不允许使用 pd,请改用有语义化的变量名",
|
||||
},
|
||||
{
|
||||
selector: "ObjectExpression > Property[key.name='pd']",
|
||||
message: "不允许使用 pd,请改用有语义化的变量名",
|
||||
},
|
||||
],
|
||||
"no-unused-vars": ["error", { varsIgnorePattern: "^React$" }],
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"antfu/top-level-function": "off",
|
||||
"node/prefer-global/process": "off",
|
||||
"dot-notation": "off",
|
||||
"linebreak-style": ["off", "windows"],
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
module.exports = {
|
||||
compact: false,
|
||||
// 插件
|
||||
plugins: [
|
||||
[
|
||||
"@babel/plugin-proposal-decorators",
|
||||
{
|
||||
legacy: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
// 预设
|
||||
presets: [
|
||||
["@babel/preset-env", {
|
||||
targets: {
|
||||
browsers: ["ie >= 10"],
|
||||
},
|
||||
}],
|
||||
["@babel/preset-react", {
|
||||
runtime: "automatic",
|
||||
}],
|
||||
],
|
||||
};
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
module.exports = {
|
||||
// 应用后端git地址,部署上线需要
|
||||
javaGit: "<git-url>",
|
||||
// 应用后端仓库名称,部署上线需要
|
||||
javaGitName: "<git-name>",
|
||||
// 环境配置
|
||||
environment: {
|
||||
development: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
javaGitBranch: "<branch-name>",
|
||||
// 接口服务地址
|
||||
API_HOST: "http://192.168.20.100:30140",
|
||||
},
|
||||
production: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
javaGitBranch: "<branch-name>",
|
||||
// 接口服务地址
|
||||
API_HOST: "",
|
||||
},
|
||||
},
|
||||
// 应用唯一标识符
|
||||
appIdentifier: "qualifications",
|
||||
// 应用上下文注入全局变量
|
||||
contextInject: {
|
||||
// 应用Key
|
||||
appKey: "",
|
||||
fileUrl: "http://192.168.20.240:9787/mnt/",
|
||||
},
|
||||
// public/index.html注入全局变量
|
||||
windowInject: {
|
||||
// 应用标题
|
||||
title: "微应用模板",
|
||||
// 注入css链接集合
|
||||
links: [],
|
||||
element: {
|
||||
root: {
|
||||
// 挂载DOM元素ID
|
||||
id: "root",
|
||||
},
|
||||
},
|
||||
// 注入js链接集合
|
||||
scripts: [
|
||||
"https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr",
|
||||
],
|
||||
},
|
||||
// 开发服务
|
||||
server: {
|
||||
// 监听端口号
|
||||
port: "8081",
|
||||
// 服务地址
|
||||
host: "127.0.0.1",
|
||||
// 是否自动打开浏览器
|
||||
open: true,
|
||||
},
|
||||
// 框架
|
||||
framework: {
|
||||
// ant-design
|
||||
antd: {
|
||||
// 全局antd-class-name前缀
|
||||
"ant-prefix": "micro-temp",
|
||||
// 全局字体
|
||||
"fontFamily": "PingFangSC-Regular",
|
||||
// 全局主题色
|
||||
"colorPrimary": "#1677ff",
|
||||
// 全局圆角
|
||||
"borderRadius": 2,
|
||||
},
|
||||
},
|
||||
// webpack
|
||||
webpackConfig: {
|
||||
// 单页面插件
|
||||
htmlWebpackPluginOption: {
|
||||
// 自动注入编译后的文件到public/index.html中
|
||||
inject: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"paths": {
|
||||
"~/*": ["*"]
|
||||
}
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "micro-app",
|
||||
"version": "2.0.0",
|
||||
"description": "建教帮微应用模板",
|
||||
"author": "JJB",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"serve": "node node_modules/@cqsjjb/scripts/webpack.dev.server.js",
|
||||
"build": "node node_modules/@cqsjjb/scripts/webpack.build.js",
|
||||
"push": "jjb-cmd push java production",
|
||||
"clean-cache": "rimraf node_modules/.cache/webpack",
|
||||
"serve:development": "cross-env NODE_ENV=development npm run serve",
|
||||
"serve:production": "cross-env NODE_ENV=production npm run serve",
|
||||
"build:development": "cross-env NODE_ENV=development npm run build",
|
||||
"build:production": "cross-env NODE_ENV=production npm run build",
|
||||
"code-optimization": "node node_modules/@cqsjjb/scripts/code-optimization.js",
|
||||
"lint": "eslint --ext .js,.jsx,.tsx --fix src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^6.1.0",
|
||||
"@ant-design/pro-components": "^2.8.10",
|
||||
"@cqsjjb/jjb-common-decorator": "0.0.13",
|
||||
"@cqsjjb/jjb-common-lib": "1.0.0-beta.8",
|
||||
"@cqsjjb/jjb-dva-runtime": "1.0.0-rc.2",
|
||||
"@cqsjjb/jjb-react-admin-component": "3.3.0-beta.7",
|
||||
"ahooks": "^3.9.5",
|
||||
"antd": "^5.27.6",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"zy-react-library": "^1.0.129"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
"@babel/plugin-proposal-decorators": "^7.19.3",
|
||||
"@cqsjjb/scripts": "latest",
|
||||
"@eslint-react/eslint-plugin": "^2.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint-plugin-format": "^1.0.2",
|
||||
"eslint-plugin-react-hooks": "^7.0.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.23",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<!--BEGIN-->
|
||||
<!--<% var { env: $env, process: $process, mode: $mode, builtInfo: $builtInfo, links: $links, redirectLogin: $redirectLogin, framework: $framework, scripts: $scripts, element: $element } = htmlWebpackPlugin.options %>-->
|
||||
<!--<% var { appKey: $appKey, antd: $antd, basename: $basename, API_HOST: $API_HOST } = $process %>-->
|
||||
<!--<% var { ['ant-prefix']: $antPrefix, fontFamily: $fontFamily, colorPrimary: $colorPrimary, borderRadius: $borderRadius } = $antd %>-->
|
||||
<!--NED-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head data-built-info="<%= $builtInfo %>">
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="renderer" content="webkit"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover">
|
||||
<% for (const item of $links) { %>
|
||||
<link type="text/css" rel="stylesheet" href="<%= item %>"></link>
|
||||
<% } %>
|
||||
<title>--</title>
|
||||
<script>
|
||||
(function () {
|
||||
const APP_ENV = {
|
||||
antd: {
|
||||
'ant-prefix': '<%= $antPrefix %>',
|
||||
fontFamily: '<%= $fontFamily %>',
|
||||
colorPrimary: '<%= $colorPrimary %>',
|
||||
borderRadius: parseInt('<%= $borderRadius %>')
|
||||
},
|
||||
appKey: '<%= $appKey %>',
|
||||
basename: '<%= $basename %>',
|
||||
API_HOST: '<%= $API_HOST %>'
|
||||
};
|
||||
APP_ENV.API_HOST = sessionStorage.API_HOST || APP_ENV.API_HOST || window.location.origin;
|
||||
window.process = {
|
||||
env: { app: APP_ENV },
|
||||
NODE_ENV: '<%= $mode %>'
|
||||
};
|
||||
window.__JJB_ENVIRONMENT__ = {
|
||||
API_HOST: APP_ENV.API_HOST,
|
||||
redirect: '<%= $redirectLogin %>',
|
||||
FRAMEWORK: APP_ENV.antd
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
<!-- SCRIPTS -->
|
||||
<% for (const item of $scripts) { %>
|
||||
<script src="<%= item %>" type="text/javascript"></script>
|
||||
<% } %>
|
||||
</head>
|
||||
<body>
|
||||
<!-- NOSCRIPT -->
|
||||
<noscript>此网页需要开启JavaScript功能。</noscript>
|
||||
<!-- MAIN -->
|
||||
<% const { root } = $element; %>
|
||||
<div id="<%= root.id %>" style="width: 100%; height: 100%; position: relative;overflow-y: auto"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
export {};
|
||||
|
||||
// export const riskList = declareRequest(
|
||||
// "loading",
|
||||
// "Post > @/xxx",
|
||||
// "dataSource: [] | res.data || [] & total: 0 | res.totalCount || 0 & pageIndex: 1 | res.pageIndex || 1 & pageSize: 10 | res.pageSize || 10",
|
||||
// );
|
||||
// export const riskDelete = declareRequest(
|
||||
// "loading",
|
||||
// "Delete > @/xxx/{id}",
|
||||
// );
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const corpInfoList = declareRequest(
|
||||
`Post > @/basic-info/corpInfo/list`,
|
||||
);
|
||||
export const qualificationsListAll = declareRequest(
|
||||
`Post > @/qualifications/qualifications/listAll`,
|
||||
);
|
||||
export const qualificationApplyList = declareRequest(
|
||||
"qualificationApplyLoading",
|
||||
`Post > @/qualifications/qualificationsApply/list`,
|
||||
);
|
||||
export const qualificationApplyAdd = declareRequest(
|
||||
"qualificationApplyLoading",
|
||||
`Post > @/qualifications/qualificationsApply/save`,
|
||||
);
|
||||
export const qualificationApplyUpdate = declareRequest(
|
||||
"qualificationApplyLoading",
|
||||
`Put > @/qualifications/qualificationsApply/edit`,
|
||||
);
|
||||
export const qualificationApplyInfo = declareRequest(
|
||||
"qualificationApplyLoading",
|
||||
`Get > /qualifications/qualificationsApply/{id}`,
|
||||
);
|
||||
export const qualificationApplyQualificationListAll = declareRequest(
|
||||
"qualificationApplyLoading",
|
||||
`Post > @/qualifications/qualificationsDetail/listAll`,
|
||||
);
|
||||
export const qualificationApplyRejectReason = declareRequest(
|
||||
"qualificationApplyLoading",
|
||||
`Get > /qualifications/qualificationsApply/getRejectReason/{id}`,
|
||||
);
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const qualificationMaintenanceList = declareRequest(
|
||||
"qualificationMaintenanceLoading",
|
||||
`Post > @/qualifications/qualifications/list`,
|
||||
);
|
||||
export const qualificationMaintenanceUpdateStatus = declareRequest(
|
||||
"qualificationMaintenanceLoading",
|
||||
`Put > @/qualifications/qualifications/updateStatus`,
|
||||
);
|
||||
export const qualificationMaintenanceAdd = declareRequest(
|
||||
"qualificationMaintenanceLoading",
|
||||
`Post > @/qualifications/qualifications/save`,
|
||||
);
|
||||
export const qualificationMaintenanceUpdate = declareRequest(
|
||||
"qualificationMaintenanceLoading",
|
||||
`Put > @/qualifications/qualifications/edit`,
|
||||
);
|
||||
export const qualificationMaintenanceInfo = declareRequest(
|
||||
"qualificationMaintenanceLoading",
|
||||
`Get > /qualifications/qualifications/{id}`,
|
||||
);
|
||||
export const qualificationMaintenanceQualificationsAdd = declareRequest(
|
||||
"qualificationMaintenanceLoading",
|
||||
`Post > @/qualifications/qualificationsDetail/save`,
|
||||
);
|
||||
export const qualificationMaintenanceQualificationsList = declareRequest(
|
||||
"qualificationMaintenanceLoading",
|
||||
`Post > @/qualifications/qualificationsDetail/list`,
|
||||
);
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const qualificationRecordsList = declareRequest(
|
||||
"qualificationRecordsLoading",
|
||||
`Post > @/qualifications/qualificationsApply/recordList`,
|
||||
);
|
||||
export const qualificationRecordsHistoryList = declareRequest(
|
||||
"qualificationRecordsLoading",
|
||||
`Post > @/qualifications/qualificationsApply/batchListByApplyId`,
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const qualificationReviewList = declareRequest(
|
||||
"qualificationReviewLoading",
|
||||
`Post > @/qualifications/qualificationsApply/listWaitAudit`,
|
||||
);
|
||||
export const qualificationReviewInfo = declareRequest(
|
||||
"qualificationReviewLoading",
|
||||
`Get > /qualifications/qualificationsApply/{id}`,
|
||||
);
|
||||
export const qualificationReviewInfoBatchNum = declareRequest(
|
||||
"qualificationReviewLoading",
|
||||
`Get > /qualifications/qualificationsApply/{id}/{batchNum}`,
|
||||
);
|
||||
export const corpInfoDetails = declareRequest(
|
||||
"enterpriseLoading",
|
||||
"Post > @/basic-info/corpInfo/info/{id}",
|
||||
);
|
||||
export const userQualificationList = declareRequest(
|
||||
"userQualificationLoading",
|
||||
"Post > @/basic-info/userQualificationInfo/list",
|
||||
);
|
||||
export const qualificationReviewSubmit = declareRequest(
|
||||
"userQualificationLoading",
|
||||
"Post > @/qualifications/qualificationsApply/audit",
|
||||
);
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const qualificationStatistics = declareRequest(
|
||||
"qualificationStatisticsLoading",
|
||||
`Get > /qualifications/qualificationsApply/statistics`,
|
||||
);
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
import { Button, Descriptions, Modal } from "antd";
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
import PreviewPdf from "zy-react-library/components/PreviewPdf";
|
||||
import { getFileSuffix } from "zy-react-library/utils";
|
||||
|
||||
const ViewQualificationDetailsModal = (props) => {
|
||||
const previewFile = () => {
|
||||
const imgFiles = [];
|
||||
const pdfFiles = [];
|
||||
for (let i = 0; i < props.data.files.length; i++) {
|
||||
if (getFileSuffix(props.data.files[i].fileName) === "pdf") {
|
||||
pdfFiles.push(props.data.files[i]);
|
||||
}
|
||||
else {
|
||||
imgFiles.push(props.data.files[i]);
|
||||
}
|
||||
}
|
||||
if (imgFiles.length > 0 && pdfFiles.length > 0) {
|
||||
return (
|
||||
<>
|
||||
<div><PreviewImg files={imgFiles} /></div>
|
||||
<div style={{ marginTop: 20 }}><PreviewPdf files={pdfFiles} urlKey="url" /></div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
if (imgFiles.length > 0) {
|
||||
return <PreviewImg files={imgFiles} />;
|
||||
}
|
||||
if (pdfFiles.length > 0) {
|
||||
return <PreviewPdf files={pdfFiles} />;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title={`${props.data.dataName}资质`}
|
||||
width={800}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
footer={[
|
||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||
]}
|
||||
>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={1}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "资质", children: previewFile() },
|
||||
...(props.data.isValidity === 0
|
||||
? [{ label: "有效期开始时间", children: props.data.qualificationsTermStart }, { label: "有效期结束时间", children: props.data.qualificationsTermEnd }]
|
||||
: []),
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default ViewQualificationDetailsModal;
|
||||
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* 全局常量定义
|
||||
*/
|
||||
|
||||
export {};
|
||||
|
||||
// PENDING_APPROVAL(100, "待审核"),
|
||||
// IN_REVIEW(200, "审核中"),
|
||||
// REJECTED(300, "已驳回"),
|
||||
// PASSED(400, "已通过");
|
||||
|
||||
// FIRST_PARTY_AUDITING(100, "集团单位审核"),
|
||||
// COMPANY_DEPARTMENT_AUDITING(200, "股份主管部门审核"),
|
||||
// COMPANY_SAFETY_AUDITING(300, "股份安监部门审核");
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* 全局上下文定义
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
|
||||
// 获取antd全局静态方法
|
||||
export const InjectContext = React.createContext({});
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* 全局数据状态管理模块定义
|
||||
*/
|
||||
|
||||
import { defineNamespace } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const NS_GLOBAL = defineNamespace("global");
|
||||
export const NS_QUALIFICATION_MAINTENANCE = defineNamespace("qualificationMaintenance");
|
||||
export const NS_QUALIFICATION_REVIEW = defineNamespace("qualificationReview");
|
||||
export const NS_QUALIFICATION_RECORDS = defineNamespace("qualificationRecords");
|
||||
export const NS_QUALIFICATION_STATISTICS = defineNamespace("qualificationStatistics");
|
||||
export const NS_QUALIFICATION_APPLY = defineNamespace("qualificationApply");
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
import { setJJBCommonAntdMessage } from "@cqsjjb/jjb-common-lib";
|
||||
import { setup } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import "dayjs/locale/zh-cn";
|
||||
import "../blessed_by_buddha";
|
||||
|
||||
require("antd/dist/reset.css");
|
||||
|
||||
dayjs.locale("zh-cn");
|
||||
setJJBCommonAntdMessage(message);
|
||||
|
||||
const app = setup();
|
||||
|
||||
// 非底座环境运行
|
||||
if (!window.__POWERED_BY_QIANKUN__) {
|
||||
// 云组件默认依赖
|
||||
window.__coreLib = {};
|
||||
window.__coreLib.React = require("react");
|
||||
window.__coreLib.ReactDOM = require("react-dom");
|
||||
window.__coreLib.jjbCommonLib = require("@cqsjjb/jjb-common-lib");
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 挂载
|
||||
* @param props {{ setGlobalState: ({ rendered: boolean }) => void }}
|
||||
* @returns {Promise<*>} ''
|
||||
*/
|
||||
export const mount = async (props) => {
|
||||
// 云组件默认依赖
|
||||
window.__coreLib.React = require("react");
|
||||
window.__coreLib.ReactDOM = require("react-dom");
|
||||
window.__coreLib.jjbCommonLib = require("@cqsjjb/jjb-common-lib");
|
||||
app.mount(props);
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 卸载
|
||||
* @param props {object}
|
||||
* @returns {Promise<*>} ''
|
||||
*/
|
||||
export const unmount = async props => app.unmount(props);
|
||||
/**
|
||||
* @description 启动
|
||||
* @param props
|
||||
*/
|
||||
export const bootstrap = async props => app.bootstrap(props);
|
||||
|
|
@ -0,0 +1,520 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Divider, Form, message, Modal, Space, Spin } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import Upload from "zy-react-library/components/Upload";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
|
||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||
import { validatorEndTime } from "zy-react-library/utils";
|
||||
import { NS_QUALIFICATION_APPLY } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const [currentStep, setCurrentStep] = useState(1);
|
||||
const [formValues, setFormValues] = useState({});
|
||||
const [specialList, setSpecialList] = useState([]);
|
||||
const [secureList, setSecureList] = useState([]);
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
||||
setFormValues(data);
|
||||
form.setFieldsValue(data);
|
||||
setSpecialList(data.specialList);
|
||||
setSecureList(data.secureList);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
query.id && getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title={query.id ? "编辑" : "新增"} />
|
||||
<div style={{ padding: 20 }}>
|
||||
{currentStep === 1
|
||||
&& <StepOne setFormValues={setFormValues} setCurrentStep={setCurrentStep} formValues={formValues} form={form} />}
|
||||
{currentStep === 2
|
||||
&& (
|
||||
<StepTwo
|
||||
setCurrentStep={setCurrentStep}
|
||||
formValues={formValues}
|
||||
query={query}
|
||||
setSecureList={setSecureList}
|
||||
setSpecialList={setSpecialList}
|
||||
specialList={specialList}
|
||||
secureList={secureList}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const StepOneComponent = (props) => {
|
||||
const form = props.form;
|
||||
const qualificationsTypeId = Form.useWatch("qualificationsTypeId", form);
|
||||
const stakeholderLevel = Form.useWatch("stakeholderLevel", form);
|
||||
const groupUnitId = Form.useWatch("groupUnitId", form);
|
||||
const groupUnitDept = Form.useWatch("groupUnitDept", form);
|
||||
|
||||
const [corpInfoList, setCorpInfoList] = useState([]);
|
||||
const [qualificationsListAll, setQualificationsListAll] = useState([]);
|
||||
|
||||
const getQualificationsListAll = async () => {
|
||||
const { data } = await props["qualificationsListAll"]({ qualificationsTypeId, stakeholderLevel });
|
||||
setQualificationsListAll(data);
|
||||
};
|
||||
|
||||
const getCorpInfoList = async () => {
|
||||
const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000 });
|
||||
setCorpInfoList(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getCorpInfoList();
|
||||
form.setFieldsValue(props.formValues);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (qualificationsTypeId && stakeholderLevel)
|
||||
getQualificationsListAll();
|
||||
else setQualificationsListAll([]);
|
||||
}, [qualificationsTypeId, stakeholderLevel]);
|
||||
|
||||
return (
|
||||
<FormBuilder
|
||||
form={form}
|
||||
loading={props.qualificationApply.qualificationApplyLoading}
|
||||
onFinish={(values) => {
|
||||
props.setCurrentStep(2);
|
||||
props.setFormValues(values);
|
||||
}}
|
||||
submitButtonText="下一步"
|
||||
options={[
|
||||
{ label: "资质基础信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
label: "资质类别",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="qualificationsType"
|
||||
onGetLabel={label => form.setFieldValue("qualificationsTypeName", label)}
|
||||
onChange={() => {
|
||||
form.setFieldValue("groupUnitName", "");
|
||||
form.setFieldValue("groupUnitDeptName", "");
|
||||
form.setFieldValue("groupUnitUserName", "");
|
||||
form.setFieldValue("qualificationsId", "");
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "qualificationsTypeName", label: "资质类别名称", onlyForLabel: true },
|
||||
{
|
||||
name: "stakeholderLevel",
|
||||
label: "资质等级",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="stakeholderLevel"
|
||||
onGetLabel={label => form.setFieldValue("stakeholderLevelName", label)}
|
||||
onChange={() => {
|
||||
form.setFieldValue("groupUnitName", "");
|
||||
form.setFieldValue("groupUnitDeptName", "");
|
||||
form.setFieldValue("groupUnitUserName", "");
|
||||
form.setFieldValue("qualificationsId", "");
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "stakeholderLevelName", label: "资质等级名称", onlyForLabel: true },
|
||||
{
|
||||
name: "groupUnitId",
|
||||
label: "集团单位",
|
||||
dependencies: ["stakeholderLevel", "qualificationsTypeId"],
|
||||
hidden: formValues => !(formValues.stakeholderLevel === "two-level" || formValues.qualificationsTypeId === "wzgll"),
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: corpInfoList,
|
||||
itemsField: { valueKey: "id", labelKey: "corpName" },
|
||||
componentProps: {
|
||||
onChange: (event) => {
|
||||
const label = corpInfoList.find(item => item.id === event)?.corpName;
|
||||
form.setFieldValue("groupUnitName", label);
|
||||
form.setFieldValue("groupUnitDept", "");
|
||||
form.setFieldValue("groupUnitDeptName", "");
|
||||
form.setFieldValue("groupUnitUser", "");
|
||||
form.setFieldValue("groupUnitUserName", "");
|
||||
},
|
||||
},
|
||||
},
|
||||
{ name: "groupUnitName", label: "集团单位名称", onlyForLabel: true },
|
||||
{
|
||||
name: "groupUnitDept",
|
||||
label: "部门",
|
||||
dependencies: ["stakeholderLevel", "qualificationsTypeId"],
|
||||
hidden: formValues => !(formValues.stakeholderLevel === "two-level" || formValues.qualificationsTypeId === "wzgll"),
|
||||
render: (
|
||||
<DepartmentSelectTree
|
||||
params={{ eqCorpinfoId: groupUnitId }}
|
||||
isNeedCorpInfoId
|
||||
onGetLabel={label => form.setFieldValue("groupUnitDeptName", label)}
|
||||
onChange={() => {
|
||||
form.setFieldValue("groupUnitUser", "");
|
||||
form.setFieldValue("groupUnitUserName", "");
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "groupUnitDeptName", label: "部门名称", onlyForLabel: true },
|
||||
{
|
||||
name: "groupUnitUser",
|
||||
label: "负责人",
|
||||
dependencies: ["stakeholderLevel", "qualificationsTypeId"],
|
||||
hidden: formValues => !(formValues.stakeholderLevel === "two-level" || formValues.qualificationsTypeId === "wzgll"),
|
||||
render: (
|
||||
<PersonnelSelect
|
||||
params={{ departmentId: groupUnitDept }}
|
||||
onGetLabel={label => form.setFieldValue("groupUnitUserName", label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "groupUnitUserName", label: "负责人名称", onlyForLabel: true },
|
||||
{
|
||||
name: "qualificationsId",
|
||||
label: "资质名称",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: qualificationsListAll,
|
||||
itemsField: { labelKey: "qualificationsName", valueKey: "id" },
|
||||
},
|
||||
{ name: "qualificationsRemarks", label: "备注", required: false, span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
const StepTwoComponent = (props) => {
|
||||
const query = props.query;
|
||||
const secureList = props.secureList;
|
||||
const specialList = props.specialList;
|
||||
const setSecureList = props.setSecureList;
|
||||
const setSpecialList = props.setSpecialList;
|
||||
|
||||
const [uploadFileModalOpen, setUploadFileModalOpen] = useState(false);
|
||||
const [uploadFileModalData, setUploadFileModalData] = useState({
|
||||
title: "",
|
||||
index: -1,
|
||||
files: [],
|
||||
currentList: "",
|
||||
isValidity: "",
|
||||
});
|
||||
|
||||
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||
const { loading: deleteFileLoading, deleteFile } = useDeleteFile();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
const getData = async () => {
|
||||
if (!props.formValues.qualificationsId)
|
||||
return;
|
||||
if (specialList.length === 0 || secureList.length === 0) {
|
||||
const { data } = await props["qualificationApplyQualificationListAll"]({ qualificationsId: props.formValues.qualificationsId });
|
||||
setSpecialList(data.specialList || []);
|
||||
setSecureList(data.secureList || []);
|
||||
}
|
||||
else {
|
||||
for (let i = 0; i < specialList.length; i++) {
|
||||
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["148"], eqForeignKey: specialList[i].applyDetailId });
|
||||
specialList[i].files = files;
|
||||
}
|
||||
for (let i = 0; i < secureList.length; i++) {
|
||||
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["149"], eqForeignKey: secureList[i].applyDetailId });
|
||||
secureList[i].files = files;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, [props.formValues.qualificationsId]);
|
||||
|
||||
const onUploadFileOpen = (record, index, files, currentList) => {
|
||||
setUploadFileModalData({
|
||||
title: record.dataName,
|
||||
index,
|
||||
files,
|
||||
currentList,
|
||||
isValidity: record.isValidity,
|
||||
qualificationsTermStart: record.qualificationsTermStart,
|
||||
qualificationsTermEnd: record.qualificationsTermEnd,
|
||||
});
|
||||
setUploadFileModalOpen(true);
|
||||
};
|
||||
|
||||
const onUploadFileConfirm = (values, list) => {
|
||||
const newList = cloneDeep(list);
|
||||
newList[uploadFileModalData.index].files = values.files;
|
||||
newList[uploadFileModalData.index].deleteFiles = values.deleteFiles;
|
||||
newList[uploadFileModalData.index].qualificationsTermStart = values.qualificationsTermStart;
|
||||
newList[uploadFileModalData.index].qualificationsTermEnd = values.qualificationsTermEnd;
|
||||
newList[uploadFileModalData.index].uploadedTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
|
||||
return newList;
|
||||
};
|
||||
|
||||
const validateFileList = (list) => {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (!list[i].files || list[i].files.length === 0) {
|
||||
message.error(`请上传${list[i].dataName}的资质`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (!validateFileList(specialList))
|
||||
return;
|
||||
if (!validateFileList(secureList))
|
||||
return;
|
||||
for (let i = 0; i < specialList.length; i++) {
|
||||
await deleteFile({ single: false, files: specialList[i].deleteFiles });
|
||||
const { id } = await uploadFile({
|
||||
single: false,
|
||||
files: specialList[i].files,
|
||||
params: { type: UPLOAD_FILE_TYPE_ENUM["148"], foreignKey: specialList[i].applyDetailId },
|
||||
});
|
||||
specialList[i].applyDetailId = id;
|
||||
}
|
||||
for (let i = 0; i < secureList.length; i++) {
|
||||
await deleteFile({ single: false, files: secureList[i].deleteFiles });
|
||||
const { id } = await uploadFile({
|
||||
single: false,
|
||||
files: secureList[i].files,
|
||||
params: { type: UPLOAD_FILE_TYPE_ENUM["149"], foreignKey: secureList[i].applyDetailId },
|
||||
});
|
||||
secureList[i].applyDetailId = id;
|
||||
}
|
||||
const data = { ...props.formValues, qualificationsApplyDetailList: [...specialList, ...secureList] };
|
||||
const { success } = await props[!query.id ? "qualificationApplyAdd" : "qualificationApplyUpdate"]({
|
||||
...data,
|
||||
batchNum: 1,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("提交成功,请等待审核");
|
||||
window.history.back();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Spin
|
||||
spinning={props.qualificationApply.qualificationApplyLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||
>
|
||||
<div>
|
||||
<Divider orientation="left">专项资质信息</Divider>
|
||||
<Table
|
||||
dataSource={specialList}
|
||||
pagination={false}
|
||||
options={false}
|
||||
disabledResizer={true}
|
||||
columns={[
|
||||
{ title: "材料名称", dataIndex: "dataName" },
|
||||
{ title: "上传时间", dataIndex: "uploadedTime", render: (_, record) => record.uploadedTime || "-" },
|
||||
{
|
||||
title: "时效性",
|
||||
dataIndex: "qualificationsTermStart",
|
||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
render: (_, record, index) => (
|
||||
<Space>
|
||||
{
|
||||
record.files?.length > 0
|
||||
? (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
onUploadFileOpen(record, index, record.files, "specialList");
|
||||
}}
|
||||
>
|
||||
修改
|
||||
</Button>
|
||||
)
|
||||
: (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
onUploadFileOpen(record, index, [], "specialList");
|
||||
}}
|
||||
>
|
||||
上传
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Divider orientation="left">安全资质信息</Divider>
|
||||
<Table
|
||||
dataSource={secureList}
|
||||
pagination={false}
|
||||
options={false}
|
||||
disabledResizer={true}
|
||||
columns={[
|
||||
{ title: "材料名称", dataIndex: "dataName" },
|
||||
{ title: "上传时间", dataIndex: "uploadedTime", render: (_, record) => record.uploadedTime || "-" },
|
||||
{
|
||||
title: "时效性",
|
||||
dataIndex: "qualificationsTermStart",
|
||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
render: (_, record, index) => (
|
||||
<Space>
|
||||
{
|
||||
record.files?.length > 0
|
||||
? (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
onUploadFileOpen(record, index, record.files, "secureList");
|
||||
}}
|
||||
>
|
||||
修改
|
||||
</Button>
|
||||
)
|
||||
: (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
onUploadFileOpen(record, index, [], "secureList");
|
||||
}}
|
||||
>
|
||||
上传
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ textAlign: "center", marginTop: 20 }}>
|
||||
<Space>
|
||||
<Button onClick={() => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "填写的信息将被清除,确定要返回吗?",
|
||||
onOk: () => props.setCurrentStep(1),
|
||||
});
|
||||
}}
|
||||
>
|
||||
上一步
|
||||
</Button>
|
||||
<Button type="primary" onClick={onSubmit}>提交审核</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</Spin>
|
||||
{uploadFileModalOpen && (
|
||||
<FileUpload
|
||||
data={uploadFileModalData}
|
||||
onCancel={() => {
|
||||
setUploadFileModalOpen(false);
|
||||
}}
|
||||
onSubmit={(values) => {
|
||||
setUploadFileModalOpen(false);
|
||||
if (uploadFileModalData.currentList === "specialList") {
|
||||
setSpecialList(onUploadFileConfirm(values, specialList));
|
||||
return;
|
||||
}
|
||||
setSecureList(onUploadFileConfirm(values, secureList));
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const FileUpload = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const qualificationsTermStart = Form.useWatch("qualificationsTermStart", form);
|
||||
|
||||
useEffect(() => {
|
||||
form.setFieldsValue({
|
||||
files: props.data.files,
|
||||
qualificationsTermStart: props.data.qualificationsTermStart,
|
||||
qualificationsTermEnd: props.data.qualificationsTermEnd,
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title={`${props.data.title}资质`}
|
||||
width={800}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
showActionButtons={false}
|
||||
onFinish={values => props.onSubmit(values)}
|
||||
span={24}
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{
|
||||
name: "files",
|
||||
label: "资质",
|
||||
render: (
|
||||
<Upload
|
||||
fileType="image"
|
||||
maxCount={10}
|
||||
accept=".pdf,.jpg,.jpeg,.png"
|
||||
onGetRemoveFile={(file) => {
|
||||
form.setFieldValue("deleteFiles", [...(form.getFieldValue("deleteFiles") || []), file]);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "deleteFiles", label: "删除的资质", onlyForLabel: true },
|
||||
{
|
||||
name: "qualificationsTermStart",
|
||||
label: "有效期开始时间",
|
||||
render: FORM_ITEM_RENDER_ENUM.DATETIME,
|
||||
hidden: !(props.data.isValidity === 0),
|
||||
},
|
||||
{
|
||||
name: "qualificationsTermEnd",
|
||||
label: "有效期结束时间",
|
||||
render: FORM_ITEM_RENDER_ENUM.DATETIME,
|
||||
rules: [validatorEndTime(qualificationsTermStart)],
|
||||
hidden: !(props.data.isValidity === 0),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const StepOne = Connect([NS_QUALIFICATION_APPLY], true)(StepOneComponent);
|
||||
const StepTwo = Connect([NS_QUALIFICATION_APPLY], true)(StepTwoComponent);
|
||||
|
||||
export default Connect([NS_QUALIFICATION_APPLY], true)(Add);
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_APPLY } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false);
|
||||
const [rejectReason, setRejectReason] = useState(false);
|
||||
|
||||
const { tableProps, getData } = useTable(props["qualificationApplyList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onViewRejectReason = async (id) => {
|
||||
const { data } = await props["qualificationApplyRejectReason"]({ id });
|
||||
setRejectReason(data);
|
||||
setRejectReasonModalOpen(true);
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{ name: "qualificationsTypeId", label: "相关方类别", render: (<DictionarySelect dictValue="qualificationsType" />) },
|
||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<AddIcon />}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别(相关方类别)", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "材料数量", dataIndex: "materialNum" },
|
||||
{ title: "审核公司", dataIndex: "groupUnitName" },
|
||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
||||
{ title: "审核状态", dataIndex: "status", render: (_, record) => (
|
||||
<>
|
||||
{record.status === 200 && "审核中"}
|
||||
{record.status === 300 && "已驳回"}
|
||||
{record.status === 400 && "已通过"}
|
||||
</>
|
||||
) },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 200,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
disabled={record.status !== 300}
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
修改
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
disabled={record.status !== 300}
|
||||
onClick={() => {
|
||||
onViewRejectReason(record.id);
|
||||
}}
|
||||
>
|
||||
查看驳回原因
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
{rejectReasonModalOpen && <RejectReason rejectReason={rejectReason} onCancel={() => setRejectReasonModalOpen(false)} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const RejectReason = (props) => {
|
||||
return (
|
||||
<Modal
|
||||
title="查看驳回原因"
|
||||
width={800}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
footer={[
|
||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||
]}
|
||||
>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={1}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "驳回原因", children: props.rejectReason },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default Connect([NS_QUALIFICATION_APPLY], true)(List);
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Divider, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import ViewQualificationDetailsModal from "~/components/ViewQualificationDetailsModal";
|
||||
import { NS_QUALIFICATION_APPLY } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
const [info, setInfo] = useState([]);
|
||||
const [specialList, setSpecialList] = useState([]);
|
||||
const [secureList, setSecureList] = useState([]);
|
||||
const [viewQualificationDetailsModalOpen, setViewQualificationDetailsModalOpen] = useState(false);
|
||||
const [viewQualificationDetailsModalData, setViewQualificationDetailsModalData] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
for (let i = 0; i < data.specialList.length; i++) {
|
||||
const files = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
||||
eqForeignKey: data.specialList[i].applyDetailId,
|
||||
});
|
||||
data.specialList[i].files = files;
|
||||
}
|
||||
for (let i = 0; i < data.secureList.length; i++) {
|
||||
const files = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["149"],
|
||||
eqForeignKey: data.secureList[i].applyDetailId,
|
||||
});
|
||||
data.secureList[i].files = files;
|
||||
}
|
||||
setSpecialList(data.specialList);
|
||||
setSecureList(data.secureList);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="查看" />
|
||||
<div style={{ padding: 20 }}>
|
||||
<Spin
|
||||
spinning={props.qualificationApply.qualificationApplyLoading || getFileLoading}
|
||||
>
|
||||
<div>
|
||||
<Divider orientation="left">资质基础信息</Divider>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={1}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "资质类别", children: info.qualificationsTypeName },
|
||||
{ label: "资质等级", children: info.stakeholderLevelName },
|
||||
...(info.stakeholderLevel === "two-level"
|
||||
? [
|
||||
{ label: "集团单位", children: info.groupUnitName },
|
||||
{ label: "部门", children: info.groupUnitDeptName },
|
||||
{ label: "负责人", children: info.groupUnitUserName },
|
||||
]
|
||||
: []),
|
||||
{ label: "资质名称", children: info.qualificationsName },
|
||||
{ label: "备注", children: info.qualificationsRemarks },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Divider orientation="left">专项资质信息</Divider>
|
||||
<Table
|
||||
dataSource={specialList}
|
||||
pagination={false}
|
||||
options={false}
|
||||
disabledResizer={true}
|
||||
columns={[
|
||||
{ title: "材料名称", dataIndex: "dataName" },
|
||||
{ title: "上传时间", dataIndex: "uploadedTime", render: (_, record) => record.uploadedTime || "-" },
|
||||
{
|
||||
title: "时效性",
|
||||
dataIndex: "qualificationsTermStart",
|
||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 80,
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setViewQualificationDetailsModalOpen(true);
|
||||
setViewQualificationDetailsModalData(record);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Divider orientation="left">安全资质信息</Divider>
|
||||
<Table
|
||||
dataSource={secureList}
|
||||
pagination={false}
|
||||
options={false}
|
||||
disabledResizer={true}
|
||||
columns={[
|
||||
{ title: "材料名称", dataIndex: "dataName" },
|
||||
{ title: "上传时间", dataIndex: "uploadedTime", render: (_, record) => record.uploadedTime || "-" },
|
||||
{
|
||||
title: "时效性",
|
||||
dataIndex: "qualificationsTermStart",
|
||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 80,
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setViewQualificationDetailsModalOpen(true);
|
||||
setViewQualificationDetailsModalData(record);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</Spin>
|
||||
{viewQualificationDetailsModalOpen
|
||||
&& <ViewQualificationDetailsModal onCancel={() => setViewQualificationDetailsModalOpen(false)} data={viewQualificationDetailsModalData} />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_APPLY], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function QualificationApply(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default QualificationApply;
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_RECORDS } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["qualificationRecordsList"], {
|
||||
form,
|
||||
transform: (formData) => {
|
||||
const auditStatus = formData.auditStatus?.split("-") || [];
|
||||
return {
|
||||
auditProcess: auditStatus[0],
|
||||
auditStatus: auditStatus[1],
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
label: "相关方类别",
|
||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||
},
|
||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
{ name: "auditStatus", label: "审核状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [
|
||||
{ bianma: "200-200", name: "主管部门审核中" },
|
||||
{ bianma: "200-300", name: "主管部门已驳回" },
|
||||
{ bianma: "300-200", name: "安监部门审核中" },
|
||||
{ bianma: "300-300", name: "安监部门已驳回" },
|
||||
{ bianma: "400", name: "已完成" },
|
||||
] },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "相关方名称", dataIndex: "corpName" },
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "资质等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "材料数", dataIndex: "materialNum" },
|
||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
||||
{ title: "当前状态", dataIndex: "auditProcess", render: (_, record) => (
|
||||
<div>
|
||||
{record.auditProcess === "100" && "集团单位"}
|
||||
{record.auditProcess === "200" && "股份主管部门"}
|
||||
{record.auditProcess === "300" && "股份安监部门"}
|
||||
{record.status === 100 && "待审核"}
|
||||
{record.status === 200 && "审核中"}
|
||||
{record.status === 300 && "已驳回"}
|
||||
{record.status === 400 && "已通过"}
|
||||
</div>
|
||||
) },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../ViewInfo?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_RECORDS], true)(List);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function QualificationRecords(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default QualificationRecords;
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["qualificationReviewList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
label: "相关方类别",
|
||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||
},
|
||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "相关方名称", dataIndex: "corpName" },
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "材料数", dataIndex: "materialNum" },
|
||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./review?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
审核
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_REVIEW], true)(List);
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||
import ViewInfo from "../../../Supervision/ViewInfo";
|
||||
|
||||
function Review(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [rejectModalOpen, setRejectModalOpen] = useState(false);
|
||||
const [passModalOpen, setPassModalOpen] = useState(false);
|
||||
|
||||
const onSubmit = async () => {
|
||||
const { success } = await props["qualificationReviewSubmit"]({ id: query.id, status: "400" });
|
||||
if (success) {
|
||||
message.success("已提交至股份公司主管部门审核");
|
||||
props.onCancel();
|
||||
window.history.back();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ViewInfo title="审核">
|
||||
<div style={{ textAlign: "center", marginTop: 10 }}>
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={onSubmit}
|
||||
>
|
||||
通过
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
onClick={() => {
|
||||
setRejectModalOpen(true);
|
||||
}}
|
||||
>
|
||||
驳回
|
||||
</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</ViewInfo>
|
||||
{rejectModalOpen && <RejectModal onCancel={() => setRejectModalOpen(false)} id={query.id} />}
|
||||
{passModalOpen && <PassModal onCancel={() => setPassModalOpen(false)} id={query.id} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const RejectModalComponent = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["qualificationReviewSubmit"]({ ...values, id: props.id, status: "300" });
|
||||
if (success) {
|
||||
message.success("驳回成功");
|
||||
props.onCancel();
|
||||
window.history.back();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title="驳回"
|
||||
width={1000}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
span={24}
|
||||
labelCol={{ span: 8 }}
|
||||
showActionButtons={false}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
{ name: "auditRemarks", label: "驳回原因", render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const RejectModal = Connect([NS_QUALIFICATION_REVIEW], true)(RejectModalComponent);
|
||||
export default Connect([NS_QUALIFICATION_REVIEW], true)(Review);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function QualificationReview(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default QualificationReview;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import InfoPage from "../../Supervision/ViewInfo";
|
||||
|
||||
function ViewInfo() {
|
||||
return (
|
||||
<InfoPage />
|
||||
);
|
||||
}
|
||||
|
||||
export default ViewInfo;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function BranchCompany(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default BranchCompany;
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
import { ImportCore } from "@cqsjjb/jjb-common-decorator/module";
|
||||
import React from "react";
|
||||
|
||||
export default class Entry extends React.Component {
|
||||
state = {
|
||||
Component: undefined,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
if (process.env.app.appKey) {
|
||||
ImportCore({
|
||||
name: "$",
|
||||
from: "https://cdn.cqjjb.cn/jcloud/use/plugin/b31c9840a57f11ef91cf7f3cabbb7484/latest",
|
||||
}).then((res) => {
|
||||
if (res.status) {
|
||||
this.setState({ Component: res.module?.default });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { Component } = this.state;
|
||||
return (Component && process.env.app.appKey) && (
|
||||
<Component
|
||||
detail={{ componentKey: process.env.app.appKey }}
|
||||
appKey={process.env.app.appKey}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["qualificationReviewList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
label: "相关方类别",
|
||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||
},
|
||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "相关方名称", dataIndex: "corpName" },
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "材料数", dataIndex: "materialNum" },
|
||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./review?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
审核
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_REVIEW], true)(List);
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||
import ViewInfo from "../../ViewInfo";
|
||||
|
||||
function Review() {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [rejectModalOpen, setRejectModalOpen] = useState(false);
|
||||
const [passModalOpen, setPassModalOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ViewInfo title="审核">
|
||||
<div style={{ textAlign: "center", marginTop: 10 }}>
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
setPassModalOpen(true);
|
||||
}}
|
||||
>
|
||||
通过
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
onClick={() => {
|
||||
setRejectModalOpen(true);
|
||||
}}
|
||||
>
|
||||
驳回
|
||||
</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</ViewInfo>
|
||||
{rejectModalOpen && <RejectModal onCancel={() => setRejectModalOpen(false)} id={query.id} />}
|
||||
{passModalOpen && <PassModal onCancel={() => setPassModalOpen(false)} id={query.id} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const RejectModalComponent = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["qualificationReviewSubmit"]({ ...values, id: props.id, status: "300" });
|
||||
if (success) {
|
||||
message.success("驳回成功");
|
||||
props.onCancel();
|
||||
window.history.back();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title="驳回"
|
||||
width={1000}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
span={24}
|
||||
labelCol={{ span: 8 }}
|
||||
showActionButtons={false}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
{ name: "auditRemarks", label: "驳回原因", render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const PassModalComponent = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const managerDept = Form.useWatch("managerDept", form);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["qualificationReviewSubmit"]({ ...values, id: props.id, status: "400" });
|
||||
if (success) {
|
||||
message.success("通过成功");
|
||||
props.onCancel();
|
||||
window.history.back();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title="通过"
|
||||
width={1000}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
labelCol={{ span: 8 }}
|
||||
showActionButtons={false}
|
||||
onFinish={onSubmit}
|
||||
span={24}
|
||||
options={[
|
||||
{
|
||||
name: "managerDept",
|
||||
label: "主管部门",
|
||||
render: (
|
||||
<DepartmentSelectTree
|
||||
onGetLabel={label => form.setFieldValue("managerDeptName", label)}
|
||||
onChange={() => {
|
||||
form.setFieldValue("managerUser", "");
|
||||
form.setFieldValue("managerUserName", "");
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "managerDeptName", label: "主管部门名称", onlyForLabel: true },
|
||||
{
|
||||
name: "managerUser",
|
||||
label: "负责人",
|
||||
render: (<PersonnelSelect params={{ departmentId: managerDept }} onGetLabel={label => form.setFieldValue("managerUserName", label)} />),
|
||||
},
|
||||
{ name: "managerUserName", label: "负责人名称", onlyForLabel: true },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const RejectModal = Connect([NS_QUALIFICATION_REVIEW], true)(RejectModalComponent);
|
||||
const PassModal = Connect([NS_QUALIFICATION_REVIEW], true)(PassModalComponent);
|
||||
export default Connect([NS_QUALIFICATION_REVIEW], true)(Review);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function QualificationReview(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default QualificationReview;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import InfoPage from "../../Supervision/ViewInfo";
|
||||
|
||||
function ViewInfo() {
|
||||
return (
|
||||
<InfoPage />
|
||||
);
|
||||
}
|
||||
|
||||
export default ViewInfo;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Local(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default Local;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import AddPage from "../../../BranchCompany/QualificationApply/Add";
|
||||
|
||||
function Add() {
|
||||
return (<AddPage />);
|
||||
};
|
||||
|
||||
export default Add;
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_APPLY } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false);
|
||||
const [rejectReason, setRejectReason] = useState(false);
|
||||
|
||||
const { tableProps, getData } = useTable(props["qualificationApplyList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onViewRejectReason = async (id) => {
|
||||
const { data } = await props["qualificationApplyRejectReason"]({ id });
|
||||
setRejectReason(data);
|
||||
setRejectReasonModalOpen(true);
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{ name: "qualificationsTypeId", label: "相关方类别", render: (<DictionarySelect dictValue="qualificationsType" />) },
|
||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<AddIcon />}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别(相关方类别)", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "资质等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "材料数量", dataIndex: "materialNum" },
|
||||
{ title: "直属审核公司", dataIndex: "groupUnitName" },
|
||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
||||
{ title: "审核状态", dataIndex: "status", render: (_, record) => (
|
||||
<>
|
||||
{record.status === 200 && "审核中"}
|
||||
{record.status === 300 && "已驳回"}
|
||||
{record.status === 400 && "已通过"}
|
||||
</>
|
||||
) },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 200,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
disabled={record.status !== 300}
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
修改
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
disabled={record.status !== 300}
|
||||
onClick={() => {
|
||||
onViewRejectReason(record.id);
|
||||
}}
|
||||
>
|
||||
查看驳回原因
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
{rejectReasonModalOpen && <RejectReason rejectReason={rejectReason} onCancel={() => setRejectReasonModalOpen(false)} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const RejectReason = (props) => {
|
||||
return (
|
||||
<Modal
|
||||
title="查看驳回原因"
|
||||
width={800}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
footer={[
|
||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||
]}
|
||||
>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={1}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "驳回原因", children: props.rejectReason },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default Connect([NS_QUALIFICATION_APPLY], true)(List);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import ViewPage from "../../../BranchCompany/QualificationApply/View";
|
||||
|
||||
function View() {
|
||||
return (<ViewPage />);
|
||||
};
|
||||
|
||||
export default View;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function QualificationApply(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default QualificationApply;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import ListPage from "../../../BranchCompany/QualificationRecords/List";
|
||||
|
||||
function List(props) {
|
||||
return (<ListPage {...props} />);
|
||||
}
|
||||
|
||||
export default List;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function QualificationRecords(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default QualificationRecords;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import InfoPage from "../../Supervision/ViewInfo";
|
||||
|
||||
function ViewInfo() {
|
||||
return (
|
||||
<InfoPage />
|
||||
);
|
||||
}
|
||||
|
||||
export default ViewInfo;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Stakeholder(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default Stakeholder;
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Form, message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const managerDept = Form.useWatch("managerDept", form);
|
||||
const supervisionDept = Form.useWatch("supervisionDept", form);
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["qualificationMaintenanceInfo"]({ id: query.id });
|
||||
form.setFieldsValue({
|
||||
...data,
|
||||
managerUser: data.managerUser.split(","),
|
||||
managerUserName: data.managerUserName.split(","),
|
||||
supervisionUser: data.supervisionUser.split(","),
|
||||
supervisionUserName: data.supervisionUserName.split(","),
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
query.id && getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[!query.id ? "qualificationMaintenanceAdd" : "qualificationMaintenanceUpdate"]({
|
||||
...values,
|
||||
managerUser: values.managerUser.join(","),
|
||||
managerUserName: values.managerUserName.join(","),
|
||||
supervisionUser: values.supervisionUser.join(","),
|
||||
supervisionUserName: values.supervisionUserName.join(","),
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("操作成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title={query.id ? "编辑" : "新增"} />
|
||||
<div style={{ paddingBottom: 20 }}>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
values={{
|
||||
status: 0,
|
||||
}}
|
||||
loading={props.qualificationMaintenance.qualificationMaintenanceLoading}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称", span: 24 },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
label: "相关方类别",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="qualificationsType"
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("qualificationsTypeName", label);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "qualificationsTypeName", label: "相关方类别名称", onlyForLabel: true },
|
||||
{
|
||||
name: "stakeholderLevel",
|
||||
label: "资质级别",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="stakeholderLevel"
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("stakeholderLevelName", label);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "stakeholderLevelName", label: "资质级别名称", onlyForLabel: true },
|
||||
{
|
||||
name: "managerDept",
|
||||
label: "主管部门",
|
||||
render: (
|
||||
<DepartmentSelectTree
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("managerDeptName", label);
|
||||
}}
|
||||
onChange={(_, __, extra) => {
|
||||
form.setFieldValue("managerUser", []);
|
||||
form.setFieldValue("managerUserName", []);
|
||||
form.setFieldValue("corpId", extra.triggerNode.props.corpinfoId);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "managerDeptName", label: "主管部门名称", onlyForLabel: true },
|
||||
{ name: "corpId", label: "主管部门所属公司", onlyForLabel: true },
|
||||
{
|
||||
name: "managerUser",
|
||||
label: "主管人员",
|
||||
render: (
|
||||
<PersonnelSelect
|
||||
params={{ departmentId: managerDept }}
|
||||
mode="multiple"
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("managerUserName", label);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "managerUserName", label: "主管人员名称", onlyForLabel: true },
|
||||
{
|
||||
name: "supervisionDept",
|
||||
label: "安监部门",
|
||||
render: (
|
||||
<DepartmentSelectTree
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("supervisionDeptName", label);
|
||||
}}
|
||||
onChange={() => {
|
||||
form.setFieldValue("supervisionUser", []);
|
||||
form.setFieldValue("supervisionUserName", []);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "supervisionDeptName", label: "安监部门名称", onlyForLabel: true },
|
||||
{
|
||||
name: "supervisionUser",
|
||||
label: "安监人员",
|
||||
render: (
|
||||
<PersonnelSelect
|
||||
params={{ departmentId: supervisionDept }}
|
||||
mode="multiple"
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("supervisionUserName", label);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "supervisionUserName", label: "安监人员名称", onlyForLabel: true },
|
||||
{
|
||||
name: "status",
|
||||
label: "是否启用",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ name: "是", bianma: 0 }, { name: "否", bianma: 1 }],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_MAINTENANCE], true)(Add);
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Col, Form, Input, message, Radio, Row } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
||||
|
||||
function AddQualifications(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["qualificationMaintenanceQualificationsList"]({ qualificationsId: query.id });
|
||||
data.length > 0 && form.setFieldsValue({ qualificationsDetailAddCmdList: data });
|
||||
};
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["qualificationMaintenanceQualificationsAdd"]({ ...values, qualificationsId: query.id });
|
||||
if (success) {
|
||||
message.success("操作成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="添加资质" />
|
||||
<div style={{ paddingBottom: 20 }}>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
values={{ qualificationsDetailAddCmdList: [{
|
||||
dataType: undefined,
|
||||
dataTypeName: undefined,
|
||||
dataName: undefined,
|
||||
isValidity: undefined,
|
||||
}] }}
|
||||
loading={props.qualificationMaintenance.qualificationMaintenanceLoading}
|
||||
onFinish={onSubmit}
|
||||
span={24}
|
||||
labelCol={{ span: 6 }}
|
||||
options={[
|
||||
{ key: "qualificationsDetailAddCmdList", customizeRender: true, render: (
|
||||
<Form.List name="qualificationsDetailAddCmdList">
|
||||
{(fields, { add, remove }) => (
|
||||
<>
|
||||
{fields.map((field, index) => (
|
||||
<Row gutter={24} key={field.key}>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label="资料属性"
|
||||
rules={[{ required: true, message: "请选择资料属性" }]}
|
||||
name={[field.name, "dataType"]}
|
||||
>
|
||||
<DictionarySelect
|
||||
dictValue="dataType"
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue(["qualificationsDetailAddCmdList", field.name, "dataTypeName"], label);
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="资料属性名称" noStyle name={[field.name, "dataTypeName"]}>
|
||||
<input type="hidden" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label="资料名称"
|
||||
rules={[{ required: true, message: "请输入资料名称" }, { max: 50, message: "最多输入50字符" }]}
|
||||
name={[field.name, "dataName"]}
|
||||
>
|
||||
<Input placeholder="请输入资料名称" max={50} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item label="是否涉及有效时间" required>
|
||||
<div style={{ display: "flex", gap: 10, alignItems: "center" }}>
|
||||
<Form.Item
|
||||
noStyle
|
||||
rules={[{ required: true, message: "请选择是否涉及有效时间" }]}
|
||||
name={[field.name, "isValidity"]}
|
||||
>
|
||||
<Radio.Group>
|
||||
<Radio value={0}>是</Radio>
|
||||
<Radio value={1}>否</Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
{
|
||||
index >= 1
|
||||
? <Button type="primary" danger onClick={() => remove(field.name)}>删除</Button>
|
||||
: <Button type="primary" onClick={() => add()}>添加</Button>
|
||||
}
|
||||
</div>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
</Form.List>
|
||||
) },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_MAINTENANCE], true)(AddQualifications);
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["qualificationMaintenanceList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (id, status) => {
|
||||
const msg = status === 0 ? "启用" : "禁用";
|
||||
Modal.confirm({
|
||||
title: `${msg}确认`,
|
||||
content: `确定要${msg}吗?`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["qualificationMaintenanceUpdateStatus"]({ id, status });
|
||||
if (success) {
|
||||
message.success(`${msg}成功`);
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{ name: "qualificationsTypeId", label: "相关方类别", render: (<DictionarySelect dictValue="qualificationsType" />) },
|
||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<AddIcon />}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别(相关方类别)", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "主管部门", dataIndex: "managerDeptName" },
|
||||
{ title: "材料数量", dataIndex: "materialNum" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 200,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
disabled={record.applyNum > 0}
|
||||
onClick={() => {
|
||||
props.history.push(`./addQualifications?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
添加资质
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => onDelete(record.id, record.status === 0 ? 1 : 0)}
|
||||
>
|
||||
{record.status === 0 ? "禁用" : "启用"}
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_MAINTENANCE], true)(List);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function QualificationMaintenance(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default QualificationMaintenance;
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Space } from "antd";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_RECORDS } from "~/enumerate/namespace";
|
||||
|
||||
function History(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const { tableProps } = useTable(props["qualificationRecordsHistoryList"], { params: { id: query.id } });
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="过往资料" />
|
||||
<div style={{ padding: "0 20px 20px 20px" }}>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "相关方名称", dataIndex: "corpName" },
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "材料数", dataIndex: "materialNum" },
|
||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
||||
{ title: "当前状态", dataIndex: "auditProcess", render: (_, record) => (
|
||||
<div>
|
||||
{record.auditProcess === "100" && "集团单位"}
|
||||
{record.auditProcess === "200" && "股份主管部门"}
|
||||
{record.auditProcess === "300" && "股份安监部门"}
|
||||
{record.status === 100 && "待审核"}
|
||||
{record.status === 200 && "审核中"}
|
||||
{record.status === 300 && "已驳回"}
|
||||
{record.status === 400 && "已通过"}
|
||||
</div>
|
||||
) },
|
||||
{ title: "审核时间", dataIndex: "auditTime" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../ViewInfo?id=${record.id}&batchNum=${record.batchNum}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_RECORDS], true)(History);
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_RECORDS } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["qualificationRecordsList"], {
|
||||
form,
|
||||
transform: (formData) => {
|
||||
const auditStatus = formData.auditStatus?.split("-") || [];
|
||||
return {
|
||||
auditProcess: auditStatus[0],
|
||||
auditStatus: auditStatus[1],
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
label: "相关方类别",
|
||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||
},
|
||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
{ name: "auditStatus", label: "审核状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [
|
||||
{ bianma: "200-200", name: "主管部门审核中" },
|
||||
{ bianma: "200-300", name: "主管部门已驳回" },
|
||||
{ bianma: "300-200", name: "安监部门审核中" },
|
||||
{ bianma: "300-300", name: "安监部门已驳回" },
|
||||
{ bianma: "400", name: "已完成" },
|
||||
] },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "相关方名称", dataIndex: "corpName" },
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "材料数", dataIndex: "materialNum" },
|
||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
||||
{ title: "当前状态", dataIndex: "auditProcess", render: (_, record) => (
|
||||
<div>
|
||||
{record.auditProcess === "100" && "集团单位"}
|
||||
{record.auditProcess === "200" && "股份主管部门"}
|
||||
{record.auditProcess === "300" && "股份安监部门"}
|
||||
{record.status === 100 && "待审核"}
|
||||
{record.status === 200 && "审核中"}
|
||||
{record.status === 300 && "已驳回"}
|
||||
{record.status === 400 && "已通过"}
|
||||
</div>
|
||||
) },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 130,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../ViewInfo?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./history?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
过往资料
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_RECORDS], true)(List);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function QualificationRecords(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default QualificationRecords;
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["qualificationReviewList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
label: "相关方类别",
|
||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||
},
|
||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "相关方名称", dataIndex: "corpName" },
|
||||
{
|
||||
title: "所属集团单位",
|
||||
dataIndex: "groupUnitName",
|
||||
render: (_, record) => record.stakeholderLevel === "one-level" ? "--" : record.groupUnitName,
|
||||
},
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "材料数", dataIndex: "materialNum" },
|
||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./review?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
审核
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_REVIEW], true)(List);
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { validatorEndTime } from "zy-react-library/utils";
|
||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||
import ViewInfo from "../../ViewInfo";
|
||||
|
||||
function Review(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
const [rejectModalOpen, setRejectModalOpen] = useState(false);
|
||||
const [passModalOpen, setPassModalOpen] = useState(false);
|
||||
|
||||
const onSubmit = async () => {
|
||||
const { success } = await props["qualificationReviewSubmit"]({ id: query.id, status: "400" });
|
||||
if (success) {
|
||||
message.success("已完成审核");
|
||||
window.history.back();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ViewInfo onGetData={info => setInfo(info)} title="审核">
|
||||
<div style={{ textAlign: "center", marginTop: 10 }}>
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
if (info.stakeholderLevel === "one-level") {
|
||||
setPassModalOpen(true);
|
||||
}
|
||||
else {
|
||||
onSubmit();
|
||||
}
|
||||
}}
|
||||
>
|
||||
通过
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
onClick={() => {
|
||||
setRejectModalOpen(true);
|
||||
}}
|
||||
>
|
||||
驳回
|
||||
</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</ViewInfo>
|
||||
{rejectModalOpen && <RejectModal onCancel={() => setRejectModalOpen(false)} id={query.id} />}
|
||||
{passModalOpen && <PassModal onCancel={() => setPassModalOpen(false)} id={query.id} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const RejectModalComponent = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["qualificationReviewSubmit"]({ ...values, id: props.id, status: "300" });
|
||||
if (success) {
|
||||
message.success("驳回成功");
|
||||
props.onCancel();
|
||||
window.history.back();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title="驳回"
|
||||
width={1000}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
span={24}
|
||||
labelCol={{ span: 8 }}
|
||||
showActionButtons={false}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
{ name: "auditRemarks", label: "驳回原因", render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const PassModalComponent = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["qualificationReviewSubmit"]({ ...values, id: props.id, status: "400" });
|
||||
if (success) {
|
||||
message.success("通过成功");
|
||||
props.onCancel();
|
||||
window.history.back();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title="通过"
|
||||
width={1000}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
values={{ isLongTerm: 1 }}
|
||||
labelCol={{ span: 8 }}
|
||||
showActionButtons={false}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
{
|
||||
name: "isLongTerm",
|
||||
label: "供应商时效属性",
|
||||
span: 24,
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: 1, name: "长期" }, { bianma: 0, name: "短期" }],
|
||||
},
|
||||
{
|
||||
name: "periodTermStart",
|
||||
label: "有效开始时间",
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE,
|
||||
dependencies: ["isLongTerm"],
|
||||
hidden: formValues => !(formValues.isLongTerm === 0),
|
||||
},
|
||||
{
|
||||
name: "periodTermEnd",
|
||||
label: "有效结束时间",
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE,
|
||||
dependencies: ["isLongTerm"],
|
||||
hidden: formValues => !(formValues.isLongTerm === 0),
|
||||
rules: [validatorEndTime(form.getFieldValue("periodTermStart"))],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<div style={{ color: "red" }}>
|
||||
<div>长期相关方系统每年对资质进行自动复审结果,短期相关方在时间范围内无需复审,超过时间后,需要重新进行资质准入审核。</div>
|
||||
<div>长期相关方每年1月1日重置审核状态,5月1日前完成审核操作,若超出审核时间,则需要重新审核。</div>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const RejectModal = Connect([NS_QUALIFICATION_REVIEW], true)(RejectModalComponent);
|
||||
const PassModal = Connect([NS_QUALIFICATION_REVIEW], true)(PassModalComponent);
|
||||
export default Connect([NS_QUALIFICATION_REVIEW], true)(Review);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function QualificationReview(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default QualificationReview;
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
||||
|
||||
function QualificationStatistics(props) {
|
||||
const [info, setInfo] = useState({});
|
||||
const getData = async () => {
|
||||
const { data } = await props["qualificationStatistics"]();
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Descriptions
|
||||
column={1}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "相关方总数量", children: info.totalStakeholders },
|
||||
{ label: "一级相关方数量", children: info.firstLevelStakeholders },
|
||||
{ label: "二级相关方数量", children: info.secondLevelStakeholders },
|
||||
{ label: "生产类相关方数量", children: info.productionStakeholders },
|
||||
{ label: "设备类相关方数量", children: info.deviceStakeholders },
|
||||
{ label: "工程类相关方数量", children: info.projectStakeholders },
|
||||
{ label: "劳务类相关方数量", children: info.laborStakeholders },
|
||||
{ label: "卫生环保类相关方数量", children: info.healthStakeholders },
|
||||
{ label: "企业宣传类相关方数量", children: info.promotionStakeholders },
|
||||
{ label: "物资管理类相关方数量", children: info.materialStakeholders },
|
||||
{ label: "其他类相关方数量", children: info.otherStakeholders },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_STATISTICS], true)(QualificationStatistics);
|
||||
|
|
@ -0,0 +1,294 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Divider, Spin } from "antd";
|
||||
import { Fragment, useEffect, useState } from "react";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import ViewQualificationDetailsModal from "~/components/ViewQualificationDetailsModal";
|
||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||
import "./index.less";
|
||||
|
||||
const ENTERPRISE_TYPE = [
|
||||
{ bianma: 0, name: "普通企业" },
|
||||
{ bianma: 1, name: "集团单位" },
|
||||
{ bianma: 2, name: "股份单位" },
|
||||
{ bianma: 3, name: "相关方企业" },
|
||||
{ bianma: 4, name: "货主单位" },
|
||||
{ bianma: 5, name: "驻港单位" },
|
||||
];
|
||||
|
||||
function ViewInfo(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
const [info, setInfo] = useState({
|
||||
processFlow: [],
|
||||
specialList: [],
|
||||
secureList: [],
|
||||
});
|
||||
const [corpInfoData, setCorpInfoData] = useState({});
|
||||
const [list, setList] = useState([]);
|
||||
const [viewQualificationDetailsModalOpen, setViewQualificationDetailsModalOpen] = useState(false);
|
||||
const [viewQualificationDetailsModalData, setViewQualificationDetailsModalData] = useState({});
|
||||
|
||||
const getFiles = async (list) => {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["6"], eqForeignKey: list[i].userQualificationinfoId });
|
||||
list[i].files = files;
|
||||
}
|
||||
setList(list);
|
||||
};
|
||||
const { tableProps, getData: run } = useTable(props["userQualificationList"], {
|
||||
useStorageQueryCriteria: false,
|
||||
params: () => ({
|
||||
eqCorpinfoId: info.corpId,
|
||||
eqQualificationinfoType: 1,
|
||||
}),
|
||||
manual: true,
|
||||
defaultPageSize: 10,
|
||||
onSuccess: (data) => {
|
||||
getFiles(data.list);
|
||||
},
|
||||
});
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props[query.batchNum ? "qualificationReviewInfoBatchNum" : "qualificationReviewInfo"]({
|
||||
id: query.id,
|
||||
batchNum: query.batchNum,
|
||||
});
|
||||
for (let i = 0; i < data.specialList.length; i++) {
|
||||
const files = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
||||
eqForeignKey: data.specialList[i].applyDetailId,
|
||||
});
|
||||
data.specialList[i].files = files;
|
||||
}
|
||||
for (let i = 0; i < data.secureList.length; i++) {
|
||||
const files = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["149"],
|
||||
eqForeignKey: data.secureList[i].applyDetailId,
|
||||
});
|
||||
data.secureList[i].files = files;
|
||||
}
|
||||
setInfo(data);
|
||||
props.onGetData?.(data);
|
||||
|
||||
const { data: corpInfoData } = await props["corpInfoDetails"]({ id: data.corpId });
|
||||
const licenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
|
||||
eqForeignKey: data.corpId,
|
||||
});
|
||||
corpInfoData.licenseFile = licenseFile;
|
||||
setCorpInfoData(corpInfoData);
|
||||
|
||||
run();
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<HeaderBack title={props.title || "查看"} />
|
||||
<div style={{ padding: "0 20px 20px 20px" }}>
|
||||
<div className="qualification-view">
|
||||
<div>
|
||||
<Divider orientation="left">审核信息及流程</Divider>
|
||||
<Spin spinning={props.qualificationReview.qualificationReviewLoading}>
|
||||
<Descriptions
|
||||
column={2}
|
||||
bordered
|
||||
styles={{ label: { width: 200 }, content: { width: 500 } }}
|
||||
items={[
|
||||
{ label: "相关方名称", children: info.corpName },
|
||||
{ label: "所属集团单位", children: info.groupUnitName },
|
||||
{ label: "资质名称", children: info.qualificationsName },
|
||||
{ label: "资质类别", children: info.qualificationsTypeName },
|
||||
{ label: "相关方等级", children: info.stakeholderLevelName },
|
||||
{ label: "材料数", children: info.materialNum },
|
||||
{ label: "备注", children: info.qualificationsRemarks },
|
||||
]}
|
||||
/>
|
||||
<div className="flows-container">
|
||||
<div className="flows">
|
||||
{
|
||||
info.processFlow.map((item, index) => (
|
||||
<Fragment key={index}>
|
||||
<div className="flow">
|
||||
<div
|
||||
className={`status ${item.auditStatus === 400 ? "blue" : ""} ${item.auditStatus === 200 || item.auditStatus === 100 ? "green" : ""} ${item.auditStatus === 300 ? "red" : ""}`}
|
||||
>
|
||||
{item.auditStatus === 400 && "通过"}
|
||||
{item.auditStatus === 200 && "审核中"}
|
||||
{item.auditStatus === 100 && "待审核"}
|
||||
{item.auditStatus === 300 && "已驳回"}
|
||||
</div>
|
||||
<div className="info">{item.auditUserName}</div>
|
||||
<div className="info">{item.auditCorpDeptName}</div>
|
||||
<div className="info">{item.auditCorpName}</div>
|
||||
{
|
||||
item.auditRemarks && (
|
||||
<div className="info">
|
||||
驳回原因:
|
||||
{item.auditRemarks}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
{index !== info.processFlow.length - 1 && <div className="line" />}
|
||||
</Fragment>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</Spin>
|
||||
</div>
|
||||
<div>
|
||||
<Divider orientation="left">基础信息</Divider>
|
||||
<Spin spinning={props.qualificationReview.enterpriseLoading || getFileLoading}>
|
||||
<Descriptions
|
||||
column={2}
|
||||
bordered
|
||||
styles={{ label: { width: 200 }, content: { width: 500 } }}
|
||||
items={[
|
||||
{ label: "公司名称", children: corpInfoData.corpName },
|
||||
{ label: "企业状态", children: corpInfoData.corpStateName },
|
||||
{ label: "开户人", children: corpInfoData.createName },
|
||||
{ label: "统一社会信用代码", children: corpInfoData.code },
|
||||
{ label: "属地", children: corpInfoData.cityName },
|
||||
{
|
||||
label: "所属行业",
|
||||
children: [corpInfoData.corpTypeName, corpInfoData.corpType2Name, corpInfoData.corpType3Name, corpInfoData.corpType4Name].filter(Boolean).join("/"),
|
||||
},
|
||||
{ label: "单位经营地址", children: corpInfoData.addressBusiness },
|
||||
{ label: "企业规模", children: corpInfoData.scaleName },
|
||||
{ label: "法定代表人姓名", children: corpInfoData.lrName },
|
||||
{ label: "法定代表人手机号", children: corpInfoData.lrMobile },
|
||||
{ label: "主要负责人姓名", children: corpInfoData.contacts },
|
||||
{ label: "主要负责人手机号", children: corpInfoData.contactsPhone },
|
||||
{ label: "成立日期", children: corpInfoData.createDate },
|
||||
{ label: "职工人数(人)", children: corpInfoData.employees },
|
||||
{ label: "资产总额(万元)", children: corpInfoData.totalAssets },
|
||||
{ label: "注册资金(万元)", children: corpInfoData.regcapital },
|
||||
{
|
||||
label: "企业类型",
|
||||
children: getLabelName({ status: corpInfoData.type, list: ENTERPRISE_TYPE }),
|
||||
},
|
||||
{ label: "营业执照", children: <TooltipPreviewImg files={corpInfoData.licenseFile} /> },
|
||||
{ label: "营业执照有效期", children: `${corpInfoData.licenseStart} 至 ${corpInfoData.licenseEnd}` },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</div>
|
||||
<div>
|
||||
<Divider orientation="left">专项资质信息</Divider>
|
||||
<Spin spinning={props.qualificationReview.qualificationReviewLoading}>
|
||||
<Table
|
||||
options={false}
|
||||
pagination={false}
|
||||
disabledResizer={true}
|
||||
dataSource={info.specialList || []}
|
||||
columns={[
|
||||
{ title: "材料名称", dataIndex: "dataName" },
|
||||
{ title: "上传时间", dataIndex: "uploadedTime" },
|
||||
{
|
||||
title: "时效性",
|
||||
dataIndex: "qualificationsTermStart",
|
||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setViewQualificationDetailsModalOpen(true);
|
||||
setViewQualificationDetailsModalData(record);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</div>
|
||||
<div>
|
||||
<Divider orientation="left">安全资质信息</Divider>
|
||||
<Spin spinning={props.qualificationReview.qualificationReviewLoading}>
|
||||
<Table
|
||||
options={false}
|
||||
pagination={false}
|
||||
disabledResizer={true}
|
||||
dataSource={info.secureList || []}
|
||||
columns={[
|
||||
{ title: "材料名称", dataIndex: "dataName" },
|
||||
{ title: "上传时间", dataIndex: "uploadedTime" },
|
||||
{
|
||||
title: "时效性",
|
||||
dataIndex: "qualificationsTermStart",
|
||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setViewQualificationDetailsModalOpen(true);
|
||||
setViewQualificationDetailsModalData(record);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</div>
|
||||
<div>
|
||||
<Divider orientation="left">特证人员列表</Divider>
|
||||
<Table
|
||||
options={false}
|
||||
disabledResizer={true}
|
||||
columns={[
|
||||
{ title: "姓名", dataIndex: "userName" },
|
||||
{ title: "部门", dataIndex: "departmentName" },
|
||||
{ title: "人员类型", dataIndex: "todo" }, // TODO 是否流动人员 没字段
|
||||
{ title: "证书名称", dataIndex: "qualificationName" },
|
||||
{ title: "证书作业类别", dataIndex: "qualificationinfoCategoryName" },
|
||||
{ title: "操作项目", dataIndex: "operatingProjectName" },
|
||||
{ title: "证书编号", dataIndex: "certificateNo" },
|
||||
{ title: "就职状态", dataIndex: "employmentFlagName" },
|
||||
{ title: "图片", dataIndex: "files", render: (_, record) => (<TooltipPreviewImg files={record.files} />) },
|
||||
]}
|
||||
{...tableProps}
|
||||
dataSource={list}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{viewQualificationDetailsModalOpen
|
||||
&& (
|
||||
<ViewQualificationDetailsModal
|
||||
onCancel={() => setViewQualificationDetailsModalOpen(false)}
|
||||
data={viewQualificationDetailsModalData}
|
||||
/>
|
||||
)}
|
||||
{props.children}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUALIFICATION_REVIEW], true)(ViewInfo);
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
.qualification-view {
|
||||
.flows-container {
|
||||
width: 80%;
|
||||
margin: 10px auto 0;
|
||||
|
||||
.flows {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
||||
.flow {
|
||||
text-align: center;
|
||||
min-width: 120px;
|
||||
|
||||
.status {
|
||||
border-radius: 50%;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
padding: 10px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 60px;
|
||||
margin: 0 auto 10px;
|
||||
|
||||
&.blue {
|
||||
color: #1890ff;
|
||||
border-color: #1890ff;
|
||||
}
|
||||
|
||||
&.green {
|
||||
color: #52c41a;
|
||||
border-color: #52c41a;
|
||||
}
|
||||
|
||||
&.red {
|
||||
color: #ff4d4f;
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
flex: 1;
|
||||
height: 2px;
|
||||
background-color: #1890ff;
|
||||
align-self: center;
|
||||
margin: 0 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Supervision(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default Supervision;
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
import { ImportCore } from "@cqsjjb/jjb-common-decorator/module";
|
||||
import { theme as antdTheme, App, ConfigProvider } from "antd";
|
||||
import language from "antd/locale/zh_CN";
|
||||
import React from "react";
|
||||
|
||||
import { InjectContext } from "~/enumerate/context";
|
||||
|
||||
export default class Container extends React.Component {
|
||||
state = window?.base?.themeConfig || {
|
||||
algorithm: window.process.env.app.antd.algorithm,
|
||||
borderRadius: window.process.env.app.antd.borderRadius,
|
||||
colorPrimary: window.process.env.app.antd.colorPrimary,
|
||||
};
|
||||
|
||||
get token() {
|
||||
const {
|
||||
colorPrimary,
|
||||
borderRadius,
|
||||
} = this.state;
|
||||
return {
|
||||
fontFamily: window.process.env.app.antd.fontFamily,
|
||||
colorPrimary,
|
||||
borderRadius,
|
||||
};
|
||||
}
|
||||
|
||||
get algorithm() {
|
||||
return antdTheme[this.state.algorithm];
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (window.__IN_BASE__) {
|
||||
// eslint-disable-next-line react-web-api/no-leaked-event-listener
|
||||
window.base.addEventListener("EVENT_THEME_CONTROL", (e) => {
|
||||
const config = e.data;
|
||||
this.setState({ [config.field]: config.value });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<ConfigProvider
|
||||
theme={{
|
||||
token: this.token,
|
||||
algorithm: this.algorithm,
|
||||
}}
|
||||
locale={language}
|
||||
prefixCls={window.process.env.app.antd["ant-prefix"]}
|
||||
>
|
||||
<App style={{ height: "100%" }}>
|
||||
<AppMiddle {...this.props} />
|
||||
</App>
|
||||
</ConfigProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function AppMiddle(props) {
|
||||
return (
|
||||
<InjectContext.Provider value={App.useApp()}>
|
||||
{process.env.NODE_ENV === "development"
|
||||
? props.children
|
||||
: (
|
||||
<Interceptor>
|
||||
{props.children}
|
||||
</Interceptor>
|
||||
)}
|
||||
</InjectContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
class Interceptor extends React.Component {
|
||||
state = {
|
||||
Component: undefined,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
if (process.env.app.appKey) {
|
||||
ImportCore({
|
||||
name: "$",
|
||||
from: "https://cdn.cqjjb.cn/jcloud/use/plugin/b31c9840a57f11ef91cf7f3cabbb7484/latest",
|
||||
}).then(async (res) => {
|
||||
if (res.status) {
|
||||
this.setState({ Component: res.module?.PageCover });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { Component } = this.state;
|
||||
return (Component && process.env.app.appKey && process.env.NODE_ENV === "development")
|
||||
? (
|
||||
<Component appKey={process.env.app.appKey}>
|
||||
{this.props.children}
|
||||
</Component>
|
||||
)
|
||||
: this.props.children;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
export default function () {
|
||||
return (
|
||||
<h1>
|
||||
底座微应用模板,技术文档:
|
||||
<a rel="noreferrer noopener" target="_blank" href="https://www.yuque.com/buhangjiecheshen-ymbtb/qc0093/gxdun1dphetcurko">https://www.yuque.com/buhangjiecheshen-ymbtb/qc0093/gxdun1dphetcurko</a>
|
||||
</h1>
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
const path = require("node:path");
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, ".", dir);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
context: path.resolve(__dirname, "./"),
|
||||
resolve: {
|
||||
extensions: [".js"],
|
||||
alias: {
|
||||
"~": resolve("src/"),
|
||||
},
|
||||
},
|
||||
};
|
||||
Loading…
Reference in New Issue