Browse Source

前端添加印度件价格单页面

master
wanggang 1 year ago
parent
commit
3c3e5bf780
  1. 12
      .drone.yml
  2. 19
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/jia-ge-dan.js
  3. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js
  4. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js
  5. 24
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/yin-du-jian.js

12
.drone.yml

@ -8,12 +8,12 @@ platform:
os: linux os: linux
steps: steps:
- name: code-analysis - name: 分析
image: aosapps/drone-sonar-plugin image: aosapps/drone-sonar-plugin
settings: settings:
sonar_host: http://dev.ccwin-in.com:3005 sonar_host: http://dev.ccwin-in.com:3005
sonar_token: sqa_a1da3cf5984f39d9a256493acbae857c6624e954 sonar_token: sqa_a1da3cf5984f39d9a256493acbae857c6624e954
- name: build - name: 构建
image: mcr.microsoft.com/dotnet/sdk:6.0 image: mcr.microsoft.com/dotnet/sdk:6.0
privileged: true privileged: true
commands: commands:
@ -25,7 +25,7 @@ steps:
- echo ${DRONE_COMMIT_MESSAGE}>>./publish/version.txt - echo ${DRONE_COMMIT_MESSAGE}>>./publish/version.txt
- dotnet nuget locals global-packages --list - dotnet nuget locals global-packages --list
- name: publish - name: 发布到MinIO
image: plugins/s3 image: plugins/s3
settings: settings:
endpoint: http://dev.ccwin-in.com:3008 endpoint: http://dev.ccwin-in.com:3008
@ -37,7 +37,7 @@ steps:
strip_prefix: build/publish/ strip_prefix: build/publish/
target: /jie-suan/bei-qi/${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_AUTHOR}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8} 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 image: appleboy/drone-ssh
settings: settings:
host: dev.ccwin-in.com host: dev.ccwin-in.com
@ -54,7 +54,7 @@ steps:
- rm -rf bei-qi - rm -rf bei-qi
- mkdir -p bei-qi - mkdir -p bei-qi
- name: deploy-ftp - name: 部署到测试服务器
image: cschlosser/drone-ftps image: cschlosser/drone-ftps
environment: environment:
PLUGIN_HOSTNAME: dev.ccwin-in.com:16022 PLUGIN_HOSTNAME: dev.ccwin-in.com:16022
@ -65,7 +65,7 @@ steps:
PLUGIN_SECURE: false PLUGIN_SECURE: false
PLUGIN_CHMOD: false PLUGIN_CHMOD: false
- name: start - name: 启动测试服务器服务
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
host: dev.ccwin-in.com host: dev.ccwin-in.com

19
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/bei-jian.js → 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"; export default function (service) {
const queryUrl = `${baseUrl}/get-list`; const baseUrl = `settleaccount/${service}`;
const importUrl = `${baseUrl}/import`; const queryUrl = `${baseUrl}/get-list`;
const exportUrl = `${baseUrl}/export`; const importUrl = `${baseUrl}/import`;
const queryMethod = "POST"; const updateUrl = `${baseUrl}/update`;
const importMethod = "POST"; const exportUrl = `${baseUrl}/export`;
const exportMethod = "POST"; const queryMethod = "POST";
const importMethod = "POST";
export default function () { const exportMethod = "POST";
return { return {
baseUrl, baseUrl,
query: { query: {
@ -131,6 +131,7 @@ export default function () {
edit: { edit: {
importUrl, importUrl,
exportUrl, exportUrl,
updateUrl,
importMethod, importMethod,
exportMethod, exportMethod,
schema: schema, schema: schema,

10
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"), 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=采购价格单"), // ...createPage("cai-gou", "title=采购价格单"),
// children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")], // children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],

8
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 { ref } from "vue";
import request from "../../request/index.js"; import request from "../../request/index.js";
import AppList from "../../components/list/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 { export default {
components: { AppList }, components: { AppList },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />`, template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />`,
setup() { setup() {
const appListRef = ref(null); const appListRef = ref(null);
const config = useConfig(); const config = useConfig("price-list-app-service-bj");
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
const url = `${config.baseUrl}/${item.path}`;
if (item.path === "enable" || item.path === "disable") { if (item.path === "enable" || item.path === "disable") {
await appListRef.value.onClick( await appListRef.value.onClick(
async () => async () => await request(config.edit.updateUrl, { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true),
await request("settleaccount/price-list-app-service-bj/update", { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true),
`确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, `确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`,
true true
); );

24
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`<app-list ref="appListRef" :config="config" @command="onCommand" />`,
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 };
},
};
Loading…
Cancel
Save