diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 4f75c951..00000000 --- a/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -.git -.gitignore -*.md -dist diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 61076b6d..00000000 --- a/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM node:20-slim AS builder - -# --max-old-space-size -ENV PNPM_HOME="/pnpm" -ENV PATH="$PNPM_HOME:$PATH" -ENV NODE_OPTIONS=--max-old-space-size=8192 -ENV TZ=Asia/Shanghai - -RUN corepack enable - -WORKDIR /app - -# copy package.json and pnpm-lock.yaml to workspace -COPY . /app - -RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile -RUN pnpm run build - -RUN echo "Builder Success 🎉" - -FROM nginx:stable-alpine as production - -RUN echo "types { application/javascript js mjs; }" > /etc/nginx/conf.d/mjs.conf -COPY --from=builder /app/playground/dist /usr/share/nginx/html - -COPY ./nginx.conf /etc/nginx/nginx.conf - -EXPOSE 8080 - -# start nginx -CMD ["nginx", "-g", "daemon off;"] diff --git a/LICENSE b/LICENSE deleted file mode 100644 index cec5b427..00000000 --- a/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2024-present, Vben - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.ja-JP.md b/README.ja-JP.md deleted file mode 100644 index 093585d8..00000000 --- a/README.ja-JP.md +++ /dev/null @@ -1,149 +0,0 @@ -
VbenAdmin Logo

- -[![license](https://img.shields.io/github/license/anncwb/vue-vben-admin.svg)](LICENSE) - -

Vue Vben Admin

-
- -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=vbenjs_vue-vben-admin&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=vbenjs_vue-vben-admin) ![codeql](https://github.com/vbenjs/vue-vben-admin/actions/workflows/codeql.yml/badge.svg) ![build](https://github.com/vbenjs/vue-vben-admin/actions/workflows/build.yml/badge.svg) ![ci](https://github.com/vbenjs/vue-vben-admin/actions/workflows/ci.yml/badge.svg) ![deploy](https://github.com/vbenjs/vue-vben-admin/actions/workflows/deploy.yml/badge.svg) - -**日本語** | [English](./README.md) | [中文](./README.zh-CN.md) - -## 紹介 - -Vue Vben Adminは、最新の`vue3`、`vite`、`TypeScript`などの主流技術を使用して開発された、無料でオープンソースの中・後端テンプレートです。すぐに使える中・後端のフロントエンドソリューションとして、学習の参考にもなります。 - -## アップグレード通知 - -これは最新バージョン5.0であり、以前のバージョンとは互換性がありません。新しいプロジェクトを開始する場合は、最新バージョンを使用することをお勧めします。古いバージョンを表示したい場合は、[v2ブランチ](https://github.com/vbenjs/vue-vben-admin/tree/v2)を使用してください。 - -## 特徴 - -- **最新技術スタック**: Vue 3やViteなどの最先端フロントエンド技術で開発 -- **TypeScript**: アプリケーション規模のJavaScriptのための言語 -- **テーマ**: 複数のテーマカラーが利用可能で、カスタマイズオプションも豊富 -- **国際化**: 完全な内蔵国際化サポート -- **権限管理**: 動的ルートベースの権限生成ソリューションを内蔵 - -## プレビュー - -- [Vben Admin](https://vben.pro/) - フルバージョンの中国語サイト - -テストアカウント: vben/123456 - -

- VbenAdmin Logo - VbenAdmin Logo - VbenAdmin Logo -

- -### Gitpodを使用 - -Gitpod(GitHub用の無料オンライン開発環境)でプロジェクトを開き、すぐにコーディングを開始します。 - -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/vbenjs/vue-vben-admin) - -## ドキュメント - -[ドキュメント](https://doc.vben.pro/) - -## インストールと使用 - -- プロジェクトコードを取得 - -```bash -git clone https://github.com/vbenjs/vue-vben-admin.git -``` - -- 依存関係のインストール - -```bash -cd vue-vben-admin - -corepack enable - -pnpm install - -``` - -- 実行 - -```bash -pnpm dev -``` - -- ビルド - -```bash -pnpm build -``` - -## 変更ログ - -[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases) - -## 貢献方法 - -ご参加をお待ちしております![Issueを提出](https://github.com/anncwb/vue-vben-admin/issues/new/choose)するか、Pull Requestを送信してください。 - -**Pull Request:** - -1. コードをフォーク! -2. 自分のブランチを作成: `git checkout -b feat/xxxx` -3. 変更をコミット: `git commit -am 'feat(function): add xxxxx'` -4. ブランチをプッシュ: `git push origin feat/xxxx` -5. `pull request`を送信 - -## Git貢献提出規則 - -- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 規則 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)) - - - `feat` 新機能の追加 - - `fix` 問題/バグの修正 - - `style` コードスタイルに関連し、実行結果に影響しない - - `perf` 最適化/パフォーマンス向上 - - `refactor` リファクタリング - - `revert` 変更の取り消し - - `test` テスト関連 - - `docs` ドキュメント/注釈 - - `chore` 依存関係の更新/スキャフォールディング設定の変更など - - `ci` 継続的インテグレーション - - `types` 型定義ファイルの変更 - - `wip` 開発中 - -## ブラウザサポート - -ローカル開発には`Chrome 80+`ブラウザを推奨します - -モダンブラウザをサポートし、IEはサポートしません - -| [ Edge](http://godban.github.io/browsers-support-badges/)
IE | [ Edge](http://godban.github.io/browsers-support-badges/)
Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | -| :-: | :-: | :-: | :-: | :-: | -| サポートしない | 最新2バージョン | 最新2バージョン | 最新2バージョン | 最新2バージョン | - -## メンテナー - -[@Vben](https://github.com/anncwb) - -## 寄付 - -このプロジェクトが役に立つと思われた場合、作者にコーヒーを一杯おごってサポートを示すことができます! - -![donate](https://unpkg.com/@vbenjs/static-source@0.1.6/source/sponsor.png) - -Paypal Me - -## 貢献者 - - - Contributors - - -## Discord - -- [Github Discussions](https://github.com/anncwb/vue-vben-admin/discussions) - -## ライセンス - -[MIT © Vben-2020](./LICENSE) diff --git a/README.md b/README.md index 0f58308c..e69de29b 100644 --- a/README.md +++ b/README.md @@ -1,148 +0,0 @@ -
VbenAdmin Logo

- -[![license](https://img.shields.io/github/license/anncwb/vue-vben-admin.svg)](LICENSE) - -

Vue Vben Admin

-
- -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=vbenjs_vue-vben-admin&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=vbenjs_vue-vben-admin) ![codeql](https://github.com/vbenjs/vue-vben-admin/actions/workflows/codeql.yml/badge.svg) ![build](https://github.com/vbenjs/vue-vben-admin/actions/workflows/build.yml/badge.svg) ![ci](https://github.com/vbenjs/vue-vben-admin/actions/workflows/ci.yml/badge.svg) ![deploy](https://github.com/vbenjs/vue-vben-admin/actions/workflows/deploy.yml/badge.svg) - -**English** | [中文](./README.zh-CN.md) | [日本語](./README.ja-JP.md) - -## Introduction - -Vue Vben Admin is a free and open source middle and back-end template. Using the latest `vue3`, `vite`, `TypeScript` and other mainstream technology development, the out-of-the-box middle and back-end front-end solutions can also be used for learning reference. - -## Upgrade Notice - -This is the latest version, 5.0, and it is not compatible with previous versions. If you are starting a new project, it is recommended to use the latest version. If you wish to view the old version, please use the [v2 branch](https://github.com/vbenjs/vue-vben-admin/tree/v2). - -## Feature - -- **Latest Technology Stack**: Developed with cutting-edge front-end technologies like Vue 3 and Vite -- **TypeScript**: A language for application-scale JavaScript -- **Themes**: Multiple theme colors available with customizable options -- **Internationalization**: Comprehensive built-in internationalization support -- **Permissions**: Built-in solution for dynamic route-based permission generation - -## Preview - -- [Vben Admin](https://vben.pro/) - Full version Chinese site - -Test Account: vben/123456 - -

- VbenAdmin Logo - VbenAdmin Logo - VbenAdmin Logo -

- -### Use Gitpod - -Open the project in Gitpod (free online dev environment for GitHub) and start coding immediately. - -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/vbenjs/vue-vben-admin) - -## Documentation - -[Document](https://doc.vben.pro/) - -## Install and use - -- Get the project code - -```bash -git clone https://github.com/vbenjs/vue-vben-admin.git -``` - -- Installation dependencies - -```bash -cd vue-vben-admin - -corepack enable - -pnpm install -``` - -- run - -```bash -pnpm dev -``` - -- build - -```bash -pnpm build -``` - -## Change Log - -[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases) - -## How to contribute - -You are very welcome to join![Raise an issue](https://github.com/anncwb/vue-vben-admin/issues/new/choose) Or submit a Pull Request。 - -**Pull Request:** - -1. Fork code! -2. Create your own branch: `git checkout -b feat/xxxx` -3. Submit your changes: `git commit -am 'feat(function): add xxxxx'` -4. Push your branch: `git push origin feat/xxxx` -5. submit`pull request` - -## Git Contribution submission specification - -- reference [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) specification ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)) - - - `feat` Add new features - - `fix` Fix the problem/BUG - - `style` The code style is related and does not affect the running result - - `perf` Optimization/performance improvement - - `refactor` Refactor - - `revert` Undo edit - - `test` Test related - - `docs` Documentation/notes - - `chore` Dependency update/scaffolding configuration modification etc. - - `ci` Continuous integration - - `types` Type definition file changes - - `wip` In development - -## Browser support - -The `Chrome 80+` browser is recommended for local development - -Support modern browsers, not IE - -| [ Edge](http://godban.github.io/browsers-support-badges/)
IE | [ Edge](http://godban.github.io/browsers-support-badges/)
Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | -| :-: | :-: | :-: | :-: | :-: | -| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions | - -## Maintainer - -[@Vben](https://github.com/anncwb) - -## Donate - -If you think this project is helpful to you, you can help the author buy a cup of coffee to show your support! - -![donate](https://unpkg.com/@vbenjs/static-source@0.1.6/source/sponsor.png) - -Paypal Me - -## Contributor - - - Contributors - - -## Discord - -- [Github Discussions](https://github.com/anncwb/vue-vben-admin/discussions) - -## License - -[MIT © Vben-2020](./LICENSE) diff --git a/README.zh-CN.md b/README.zh-CN.md deleted file mode 100644 index 3c586bd5..00000000 --- a/README.zh-CN.md +++ /dev/null @@ -1,148 +0,0 @@ -
VbenAdmin Logo

- -[![license](https://img.shields.io/github/license/anncwb/vue-vben-admin.svg)](LICENSE) - -

Vue Vben Admin

-
- -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=vbenjs_vue-vben-admin&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=vbenjs_vue-vben-admin) ![codeql](https://github.com/vbenjs/vue-vben-admin/actions/workflows/codeql.yml/badge.svg) ![build](https://github.com/vbenjs/vue-vben-admin/actions/workflows/build.yml/badge.svg) ![ci](https://github.com/vbenjs/vue-vben-admin/actions/workflows/ci.yml/badge.svg) ![deploy](https://github.com/vbenjs/vue-vben-admin/actions/workflows/deploy.yml/badge.svg) - -**中文** | [English](./README.md) | [日本語](./README.ja-JP.md) - -## 简介 - -Vue Vben Admin 是 Vue Vben Admin 的升级版本。作为一个免费开源的中后台模板,它采用了最新的 Vue 3、Vite、TypeScript 等主流技术开发,开箱即用,可用于中后台前端开发,也适合学习参考。 - -## 升级提示 - -该版本为最新版本`5.0`, 与其他版本不兼容,如果你是新项目,建议使用最新版本。如果你想查看旧版本,请使用 [v2 分支](https://github.com/vbenjs/vue-vben-admin/tree/v2) - -## 特性 - -- **最新技术栈**:使用 Vue3/vite 等前端前沿技术开发 -- **TypeScript**: 应用程序级 JavaScript 的语言 -- **主题**:提供多套主题色彩,可配置自定义主题 -- **国际化**:内置完善的国际化方案 -- **权限** 内置完善的动态路由权限生成方案 - -## 预览 - -- [Vben Admin](https://vben.pro/) - 完整版中文站点 - -测试账号: vben/123456 - -

- VbenAdmin Logo - VbenAdmin Logo - VbenAdmin Logo -

- -### 使用 Gitpod - -在 Gitpod(适用于 GitHub 的免费在线开发环境)中打开项目,并立即开始编码. - -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/vbenjs/vue-vben-admin) - -## 文档 - -[文档地址](https://doc.vben.pro/) - -## 安装使用 - -- 获取项目代码 - -```bash -git clone https://github.com/vbenjs/vue-vben-admin.git -``` - -- 安装依赖 - -```bash -cd vue-vben-admin - -corepack enable - -pnpm install -``` - -- 运行 - -```bash -pnpm dev -``` - -- 打包 - -```bash -pnpm build -``` - -## 如何贡献 - -非常欢迎你的加入![提一个 Issue](https://github.com/anncwb/vue-vben-admin/issues/new/choose) 或者提交一个 Pull Request。 - -**Pull Request:** - -1. Fork 代码! -2. 创建自己的分支: `git checkout -b feature/xxxx` -3. 提交你的修改: `git commit -am 'feat(function): add xxxxx'` -4. 推送您的分支: `git push origin feature/xxxx` -5. 提交`pull request` - -## Git 贡献提交规范 - -- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)) - - - `feat` 增加新功能 - - `fix` 修复问题/BUG - - `style` 代码风格相关无影响运行结果的 - - `perf` 优化/性能提升 - - `refactor` 重构 - - `revert` 撤销修改 - - `test` 测试相关 - - `docs` 文档/注释 - - `chore` 依赖更新/脚手架配置修改等 - - `ci` 持续集成 - - `types` 类型定义文件更改 - - `wip` 开发中 - -## 浏览器支持 - -本地开发推荐使用`Chrome 80+` 浏览器 - -支持现代浏览器, 不支持 IE - -| [ Edge](http://godban.github.io/browsers-support-badges/)
IE | [ Edge](http://godban.github.io/browsers-support-badges/)
Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | -| :-: | :-: | :-: | :-: | :-: | -| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions | - -## 维护者 - -[@Vben](https://github.com/anncwb) - -## 捐赠 - -如果你觉得这个项目对你有帮助,你可以帮作者买一杯咖啡表示支持! - -![donate](https://unpkg.com/@vbenjs/static-source@0.1.6/source/sponsor.png) - -Paypal Me - -## 更新日志 - -[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases) - -## Contributor - - - Contributors - - -## Discord - -- [Github Discussions](https://github.com/anncwb/vue-vben-admin/discussions) - -## License - -[MIT © Vben-2020](./LICENSE) diff --git a/apps/web-office/src/plugins/vxeTable.ts b/apps/web-office/src/plugins/vxeTable.ts index cc408cce..850334f0 100644 --- a/apps/web-office/src/plugins/vxeTable.ts +++ b/apps/web-office/src/plugins/vxeTable.ts @@ -171,7 +171,7 @@ VXETable.use(VXETablePluginExportXLSX, { }) VXETable.setConfig({ - zIndex: 9999, + // zIndex: 9999, grid: { size: 'mini', proxyConfig: { diff --git a/apps/web-office/src/router/routes/core.ts b/apps/web-office/src/router/routes/core.ts index e6b2dbe4..8d572c20 100644 --- a/apps/web-office/src/router/routes/core.ts +++ b/apps/web-office/src/router/routes/core.ts @@ -31,6 +31,9 @@ const coreRoutes: RouteRecordRaw[] = [ }, { component: AuthPageLayout, + props: { + toolbar: false, + }, meta: { title: 'Authentication', }, diff --git a/apps/web-office/src/router/routes/modules/contract.ts b/apps/web-office/src/router/routes/modules/contract.ts index e6191055..8f9268dd 100644 --- a/apps/web-office/src/router/routes/modules/contract.ts +++ b/apps/web-office/src/router/routes/modules/contract.ts @@ -84,7 +84,7 @@ const routes: RouteRecordRaw[] = [ }, children: [ { - name: 'ContractBusiness', + name: 'ContractBusinessEdit', path: '/contract/business/edit/:id?', beforeEnter: (e) => { if (e.params.id && e.params.id === ':id') { @@ -129,6 +129,24 @@ const routes: RouteRecordRaw[] = [ title: '合同申报', }, children: [ + { + name: 'ContractDeclarationEdit', + path: '/contract/declaration/edit/:id?', + beforeEnter: (e) => { + if (e.params.id && e.params.id === ':id') { + e.params.id = '' + e.fullPath = '/contract/declaration/edit' + } + }, + component: () => import('#/views/contract/declaration/edit/index.vue'), + meta: { + hideInMenu: true, + hideInTab: true, + icon: 'lucide:area-chart', + title: '申报填报', + activePath: '/contract/declaration/edit/:id?' + }, + }, { name: 'ContractDeclarationTodo', path: '/contract/declaration/todo', diff --git a/apps/web-office/src/views/_core/authentication/login.vue b/apps/web-office/src/views/_core/authentication/login.vue index 5ac44b50..252a7b96 100644 --- a/apps/web-office/src/views/_core/authentication/login.vue +++ b/apps/web-office/src/views/_core/authentication/login.vue @@ -33,7 +33,7 @@ const formSchema = computed((): VbenFormSchema[] => { { component: 'VbenInput', componentProps: { - class:"w-full", + class: 'w-full', placeholder: $t('authentication.usernameTip'), }, dependencies: { @@ -79,18 +79,23 @@ function mockLogin(username: string, password: string, isSkip: boolean = true) { diff --git a/apps/web-office/src/views/bussiness-trip/todo/index.vue b/apps/web-office/src/views/bussiness-trip/todo/index.vue index 54cf6244..feada29e 100644 --- a/apps/web-office/src/views/bussiness-trip/todo/index.vue +++ b/apps/web-office/src/views/bussiness-trip/todo/index.vue @@ -1,77 +1,92 @@ - diff --git a/apps/web-office/src/views/canteen/statistics/unit-statistics.vue b/apps/web-office/src/views/canteen/statistics/unit-statistics.vue index ef4d601c..e6523342 100644 --- a/apps/web-office/src/views/canteen/statistics/unit-statistics.vue +++ b/apps/web-office/src/views/canteen/statistics/unit-statistics.vue @@ -58,13 +58,13 @@ diff --git a/apps/web-office/src/views/contract/approval/edit/index.vue b/apps/web-office/src/views/contract/approval/edit/index.vue index 3221001c..486529c5 100644 --- a/apps/web-office/src/views/contract/approval/edit/index.vue +++ b/apps/web-office/src/views/contract/approval/edit/index.vue @@ -15,8 +15,17 @@ import { getFormSchema } from "./curd"; import { FileUploader } from "#/utils/file"; import { DICT_TYPE, getDictObj, getDictOptions } from "#/utils/dict"; import { useVxeTable } from "#/hooks/vxeTable"; +import chooseSigningBasisModal from "../signing-basis/choose-signing-basis-modal.vue"; +import { useRender } from "#/hooks/useRender"; + const { xGridRef, gridProps, triggerProxy } = useVxeTable({ ref: "xGridRef" }); + +const [ChooseSigningBasisModal, chooseSigningBasisModalApi] = useVbenModal({ + connectedComponent: chooseSigningBasisModal, +}); + + const fileUploader = new FileUploader({}) const router = useRouter(); @@ -44,24 +53,49 @@ const formBinding = ref({ columns: {} }); -function getColumns(): any { +function getColumns(params): any { return [ { type: "seq", title: "序号", width: 60 }, - { field: "referenceName", title: "签约依据名称", minWidth: 150 }, - { field: "referenceId", title: "签约依据编号", width: 200 }, - { field: "attachments", title: "附件", width: 120 }, + { field: 'basisId', title: '依据号', width: 130 }, + { + field: 'basisName', + title: '依据名称', + width: 200, + }, + { field: 'basisNum', title: '依据编号', width: 180 }, + { + field: 'basisTypeId', + title: '依据类型', + width: 100, + slots: { + default: ({ row }) => { + return getDictObj(DICT_TYPE.contractBasisType, row.basisTypeId) + ?.label; + }, + }, + }, + { + field: 'endDate', + title: '有效期', + width: 150, + slots: { + default: ({ row }) => { + return useRender.renderDate(row.endDate, 'YYYY-MM-DD'); + }, + }, + }, { title: "操作", width: 120, - slots: { default: "operation" }, + slots: { default: "operate" }, }, ]; } /** Hooks - 表格 */ const gridOptions = reactive(gridProps({ - minHeight: "300px", - columns: getColumns(), + height: "200px", + columns: getColumns({ isMultiple: true }), data: [], toolbarConfig: { enabled: false, @@ -112,8 +146,8 @@ function back() { router.replace('/contract/approval/list') } -function handleOpenSignBasisModal(row) { - +function handleOpenSignBasisChooseModal(row) { + chooseSigningBasisModalApi.open() } const handleChange = (info: UploadChangeParam) => { @@ -156,6 +190,18 @@ function loadDataByContractTypeData() { } +function handleChooseConfirm(rows) { + const $grid = xGridRef.value; + // 判断上一个新增项有无完成,未完成则不允许新增 + if ($grid) { + $grid.remove(); + $grid.insert(rows).then(({ row }) => { }); + } else { + console.error("xGridRef不存在"); + } +} + + async function handleSave() { isLoading.value = true @@ -210,18 +256,30 @@ async function handleSave() { console.log(newForm) - await Apis.contractBaseInfo.post_apply({ data: newForm }).then((data) => { - message.success("保存成功"); - Modal.confirm({ - title: "提示", - content: "保存成功!是否进行提交?", - onOk: () => { - handleSubmit() - }, - onCancel: () => { - back(); - }, - }); + + let result = await Apis.contractBaseInfo.post_apply({ data: newForm }); + + return + // 判断有没有签约依据 + let tableFullData = xGridRef.value?.getTableData().fullData + if (tableFullData && tableFullData.length) { + newForm.guid = result.data.guid + newForm.basisId = tableFullData[0].basisId + await Apis.contractBaseInfo.post_apply({ data: newForm }) + } + + console.log(result) + + message.success("保存成功"); + Modal.confirm({ + title: "提示", + content: "保存成功!是否进行提交?", + onOk: () => { + handleSubmit() + }, + onCancel: () => { + back(); + } }); } catch (error) { message.error("提交失败,请稍候再试"); @@ -255,10 +313,6 @@ onMounted(async () => { isLoading.value = true console.log(id) - // let formSchema = getFormSchema() - - // formBinding.value = formSchema - try { let contractReferTypeData = await Apis.contractReferType.get_list({ params: {} }) @@ -269,7 +323,7 @@ onMounted(async () => { }) if (id) { - let data = await Apis.contractBaseInfo.get_getOne({ params: { guid: id } }) + let data:any = await Apis.contractBaseInfo.get_getOne({ params: { guid: id } }) console.log(data) currData.value = data; @@ -277,6 +331,14 @@ onMounted(async () => { formRef.value.setFormData(data) }) + // 如果有签约依据 + if(data.basisId){ + let basisList = await Apis.lxBasisSale.get_page({params:{basisId:data.basisId}}) + nextTick(() => { + xGridRef.value.insert(basisList.rows) + }) + } + if (data.fileUuid) { let files = await fileUploader.select(data.fileUuid) console.log(files) @@ -311,6 +373,8 @@ onMounted(async () => {