# wujies-quote-plugin **Repository Path**: wujies/wujies-quote-plugin ## Basic Information - **Project Name**: wujies-quote-plugin - **Description**: 报价单与价格库:客户报价单、明细加价、税率运费、价格库导入导出。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-10-23 - **Last Updated**: 2026-11-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

Wujies 无界 logo

报价管理,报价单与价格库:客户报价单、明细加价、税率运费、价格库导入导出。

应用版本 应用编码 License
官网 插件开发 打包应用 Gitee

--- ## 这个应用是什么 Wujies 无界平台([wujies.cn](https://wujies.cn))的**报价应用**,一个插件一个仓库: - **后台**:应用市场装上后多一个「报价管理」菜单,前端是远程应用(`frontend/`,6 个文件), 管客户报价单、明细加价、税率运费与价格库导入导出。 - **前台**:一个由 CMS 主题直出的公开页 —— `/site/quote`(询价目录,读价格库那一本切片), `POST /site/quote/apply` 站内接单建单、`/site/quote/workbench` 工作台;模板与样式都在本仓库里 (见「公开页与自带样式」)。 应用编码 `quote` | 应用版本 `1.0.1` | 后端构件 `wujies-quote-plugin` ## 界面截图 **报价管理主界面** ![报价管理主界面](docs/screenshots/quote.png) ## 使用方式 1. 在本仓库根打包(三条命令各管一段,都在**本仓库根**执行): ```powershell powershell -NoProfile -ExecutionPolicy Bypass -File package.ps1 -CheckOnly # ① 打包前检查:清单/产物/迁移/菜单/密钥,几秒返回 powershell -NoProfile -ExecutionPolicy Bypass -File package.ps1 -Dev # ② 开发包:不签名,落 ..\.plugin-dist\quote\dev powershell -NoProfile -ExecutionPolicy Bypass -File package.ps1 # ③ 正式包:构建 + 用 keys\private.pem 签名 ``` 2. 安装:管理端「应用市场 → 本地安装」上传 zip,或经上架中心(`wujies-market`)发布后由平台拉取。 包内产物路径由 `app.json` 的 `assets` 决定:`frontend` → `frontend/index.js` | `backend` → `backend/wujies-quote-plugin-1.0.1.jar` 关于上面三条命令的取值口径: - 判据是「脚本所在仓库根有没有 `app.json`」,所以在本仓库里**不要传 `-Plugin`**(它按子目录找清单, 会报「找不到插件目录」);`-FrontendProject` / `-FrontendDist` 也不用传 —— 独立布局的前端工程固定就是 本仓库 `frontend/`、产物 `frontend/dist`,脚本自己跑 `npm run build`(首次先 `cd frontend && npm install`, 缺依赖时脚本会把这条命令直接报给你)。只想复用现成产物就加 `-SkipBuild`。 - `-SkipFrontend` 只用于**没有前端**的纯后端应用:带前端时它会连「复制前端产物」一起跳过, 出的包只有 `app.json`,装上去没有界面。 - `-CheckOnly` 打出的 `CHECK|级别|项|说明` 行就是管理端「开发工具 → 插件开发 → 打包」抽屉里那份体检清单, 两边跑的是同一套检查;有 ERROR 时正式打包会被直接拦下。签名密钥在本仓库 `keys/` (`private.pem` + `public.pem`,已在 `.gitignore` 里),生成或更换用 `-Keygen` (覆盖已有密钥要显式加 `-KeygenForce`,旧钥先整份备份进 `keys\backup\<时间戳>\`)。 参数全表与产物结构见文档站[「打包应用」](https://docs.wujies.cn/docs/wujies/5.x/platform/package/build)与「密钥与签名」两页。 ## 开发环境 ```bash git clone git@gitee.com:wujies/wujies-quote-plugin.git cd wujies-quote-plugin ``` 最快的路子不用打包、不用重启宿主:启动平台宿主,打开管理端「**开发工具 → 插件开发**」, 找到 `quote` 这一行点「启动后端」(自动编译并加载 `target/classes`,同时开启监听)与「启动前端」 (常驻 `vite build --watch`,保存源码即重建,刷新页面生效,没有 HMR)。全流程见 文档站[「插件开发」](https://docs.wujies.cn/docs/wujies/5.x/platform/plugin)。 手工构建: ```bash mvn -B -o package -DskipTests # 后端(前提见「现状与前提」) cd frontend && npm install && npm run build # 前端,产物 dist/index.js + assets/quote-app.css ``` ## 仓库布局 | 位置 | 内容 | |---|---| | `pom.xml` | Maven 模块(父 pom = `cn.wujies.plugins:wujies-plugins-parent`,`` 已置空) | | `app.json` | 应用清单,打包器读的**唯一事实来源**(`code` / `version` / `menus` / `assets`) | | `src/`、`migrations/` | Java 源码(39 个文件)与建表/种子脚本 | | `src/main/resources/site-templates/`、`site-styles/quote/` | 公开页直出的模板(只有 `quote-list.html`),和本屏自己的样式(`.apply` 询价单那一族,18 个类只有 `quote-list.html` 在用)。样式端点见下一节 —— **新增的 `QuoteSiteAssetController` 要热加载一次 `quote` 才生效**,光 `mvn -o compile` 只更新资源、路由没注册 | | `frontend/` | 远程应用源码(6 个文件),入口 `frontend/src/index.ts` | ## 公开页与自带样式 `site-templates/quote-list.html` 由 CMS 主题渲染,`site-styles/quote/quote.css`(`.apply` 询价单那一族, 18 个类只有 `quote-list.html` 在渲染)是**这一屏自己的**样式,由本插件的 `QuoteSiteAssetController` 在 `/site/apps/quote/**` 发出,`` 清单由 `QuoteSiteRender` 作为页面变量 `appStyles` 交给主题 head。 **为什么端点必须跟着插件走**:插件各自的类加载器,本仓库的产物主题那侧读不到(模板能跨过去是因为 渲染时应用把加载器交了过来,静态资源是一次独立请求,没有那次交接)—— 谁的文件谁发。 样式里只准用主题的 CSS 变量,`:root` 那套令牌不在这里重抄一份。 口径见 `wujies-cms-plugin` README「写主题时必须守住的五条」第 5 条。 ⚠️ **热加载前该端点还没生效**:`QuoteSiteAssetController` 是新增类,本机宿主尚未热加载,所以现在 `curl http://127.0.0.1:8086/site/apps/quote/quote.css` 回的是 `application/json` 的 404(未命中的 `/site/**` 是 200 + JSON,判路由要看 content-type);热加载后才回 `200 text/css`。因此主题 `wujies-cms-plugin/themes/default/theme.css` 里那一段 `.apply` 样式暂按「先加后删」留着没删。 ## 现状与前提 本仓库是从 `wujies-plugins` 单体仓库**搬出来的第一版**,两件事还没跟上: - **后端**:本机 `mvn -B -o package -DskipTests` 实测**通过**(前提:`wujies-plugins-parent` 与 `wujies-common-*` 已在 `~/.m2`)。陌生人 clone 后会卡在找不到父 pom —— 要等后端 BOM / 构件发布那一阶段。 - **前端**:已迁到已发布的 `@wujies/*` SDK(`ui-shared` / `components` / `api-client` / `ui-plugin-bundler-kit`)。`frontend/vite.config.ts` 只声明 `defineRemoteApp({ appCode, root })`, 共享依赖一律 external、运行期由宿主 import map 兜到同一份实例;宿主独有工具与业务模块 (`@/utils/wujies`、`@/api/system/*`、`UserSelect`/`MemberSelect` 等)按原样复制进了 `frontend/src/`, `proxy?.$modal` / `useDict` / `download` 与 `ImageUpload`/`UserDetail`/`Module*Settings` 由宿主运行时提供。 本仓库前端可独立构建;要直接落位到宿主,构建前设 `WUJIES_FRONTEND_DIST=/app-market-dist/remote-apps`。 - **打包**:本仓库自带**完整**的 `package.ps1`(母本在 `wujies-plugins` 仓库根,各仓用 `node scripts/sync-package-script.mjs` 同步过来),clone 下来就能在本仓库根直接体检、构建、签名、出包、 生成密钥,不需要回到单体仓库,也不需要手工传产物路径。 ## 许可 MIT(与 `wujies-platform` 同口径;本仓库暂未放 LICENSE 文件)。 ## 参考 [`wujies-hello-plugin`](https://gitee.com/wujies/wujies-hello-plugin)(已按新布局跑通前端独立构建的样板)、 [`wujies-ui`](https://gitee.com/wujies/wujies-ui)(npm 上 `@wujies/*` 四件套的源码仓)、 文档站[「插件开发」](https://docs.wujies.cn/docs/wujies/5.x/platform/plugin)章节。