diff --git a/.drone.yml b/.drone.yml index 24b6ae47..4abf5eaf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,12 +8,12 @@ platform: os: linux steps: - - name: code-analysis + - name: 分析 image: aosapps/drone-sonar-plugin settings: sonar_host: http://dev.ccwin-in.com:3005 sonar_token: sqa_a1da3cf5984f39d9a256493acbae857c6624e954 - - name: build + - name: 构建 image: mcr.microsoft.com/dotnet/sdk:6.0 privileged: true commands: @@ -25,7 +25,7 @@ steps: - echo ${DRONE_COMMIT_MESSAGE}>>./publish/version.txt - dotnet nuget locals global-packages --list - - name: publish + - name: 发布到MinIO image: plugins/s3 settings: endpoint: http://dev.ccwin-in.com:3008 @@ -37,7 +37,7 @@ steps: strip_prefix: build/publish/ target: /jie-suan/bei-qi/${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_AUTHOR}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8} - - name: stop + - name: 停止测试服务器服务 image: appleboy/drone-ssh settings: host: dev.ccwin-in.com @@ -54,7 +54,7 @@ steps: - rm -rf bei-qi - mkdir -p bei-qi - - name: deploy-ftp + - name: 部署到测试服务器 image: cschlosser/drone-ftps environment: PLUGIN_HOSTNAME: dev.ccwin-in.com:16022 @@ -65,7 +65,7 @@ steps: PLUGIN_SECURE: false PLUGIN_CHMOD: false - - name: start + - name: 启动测试服务器服务 image: appleboy/drone-ssh settings: host: dev.ccwin-in.com diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/bei-jian.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/jia-ge-dan.js similarity index 88% rename from code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/bei-jian.js rename to code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/jia-ge-dan.js index 6dbb4b13..eb9118f2 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/bei-jian.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/jia-ge-dan.js @@ -41,15 +41,15 @@ const schema = { }, }; -const baseUrl = "settleaccount/price-list-app-service-bj"; -const queryUrl = `${baseUrl}/get-list`; -const importUrl = `${baseUrl}/import`; -const exportUrl = `${baseUrl}/export`; -const queryMethod = "POST"; -const importMethod = "POST"; -const exportMethod = "POST"; - -export default function () { +export default function (service) { + const baseUrl = `settleaccount/${service}`; + const queryUrl = `${baseUrl}/get-list`; + const importUrl = `${baseUrl}/import`; + const updateUrl = `${baseUrl}/update`; + const exportUrl = `${baseUrl}/export`; + const queryMethod = "POST"; + const importMethod = "POST"; + const exportMethod = "POST"; return { baseUrl, query: { @@ -131,6 +131,7 @@ export default function () { edit: { importUrl, exportUrl, + updateUrl, importMethod, exportMethod, schema: schema, diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js index fa221e97..0a1e1161 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js @@ -64,6 +64,16 @@ export default [ createButton("disable", "title=停用&disabled=o=>o.isCancel===true"), ], }, + { + ...createPage("yin-du-jian", "title=印度件价格单"), + children: [ + createButton("query", "title=查询&isTop=true"), + createButton("import", "title=导入&isTop=true"), + createButton("export", "title=导出&isTop=true&pattern=paged"), + createButton("enable", "title=启用&disabled=o=>o.isCancel===false"), + createButton("disable", "title=停用&disabled=o=>o.isCancel===true"), + ], + }, // { // ...createPage("cai-gou", "title=采购价格单"), // children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")], diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js index 210421b4..bd5eccc2 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js @@ -2,20 +2,18 @@ import html from "html"; import { ref } from "vue"; import request from "../../request/index.js"; import AppList from "../../components/list/index.js"; -import useConfig from "../../models/base-data/bei-jian.js"; +import useConfig from "../../models/base-data/jia-ge-dan.js"; export default { components: { AppList }, template: html``, setup() { const appListRef = ref(null); - const config = useConfig(); + const config = useConfig("price-list-app-service-bj"); const onCommand = async (item, rows) => { - const url = `${config.baseUrl}/${item.path}`; if (item.path === "enable" || item.path === "disable") { await appListRef.value.onClick( - async () => - await request("settleaccount/price-list-app-service-bj/update", { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true), + async () => await request(config.edit.updateUrl, { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true), `确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, true ); diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/yin-du-jian.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/yin-du-jian.js new file mode 100644 index 00000000..fca3f4aa --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/yin-du-jian.js @@ -0,0 +1,24 @@ +import html from "html"; +import { ref } from "vue"; +import request from "../../request/index.js"; +import AppList from "../../components/list/index.js"; +import useConfig from "../../models/base-data/jia-ge-dan.js"; + +export default { + components: { AppList }, + template: html``, + setup() { + const appListRef = ref(null); + const config = useConfig("price-list-app-service-yin-du"); + const onCommand = async (item, rows) => { + if (item.path === "enable" || item.path === "disable") { + await appListRef.value.onClick( + async () => await request(config.edit.updateUrl, { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true), + `确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, + true + ); + } + }; + return { appListRef, config, onCommand }; + }, +};