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
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

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";
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,

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"),
],
},
{
...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")],

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 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`<app-list ref="appListRef" :config="config" @command="onCommand" />`,
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
);

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