学 赵
1 year ago
31 changed files with 1366 additions and 1480 deletions
@ -0,0 +1,169 @@ |
|||||
|
import version from "../version.js"; |
||||
|
|
||||
|
const schema = { |
||||
|
title: "通用代码", |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
settleBillNum: { |
||||
|
title: "关联结算单号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
billNum: { |
||||
|
title: "发票分组号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
settleDate: { |
||||
|
title: "下线日期", |
||||
|
type: "string", |
||||
|
input: "datetime", |
||||
|
}, |
||||
|
invBillNum: { |
||||
|
title: "发票号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
lu: { |
||||
|
title: "厂内零件号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
partCode: { |
||||
|
title: "客户零件号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
materialDesc: { |
||||
|
title: "零件描述", |
||||
|
type: "decimal", |
||||
|
}, |
||||
|
pn: { |
||||
|
title: "标识号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
qty: { |
||||
|
title: "结算数量", |
||||
|
type: "number", |
||||
|
}, |
||||
|
price: { |
||||
|
title: "单价", |
||||
|
type: "number", |
||||
|
}, |
||||
|
groupNum: { |
||||
|
title: "结算分组号", |
||||
|
type: "decimal", |
||||
|
}, |
||||
|
site: { |
||||
|
title: "工厂地点", |
||||
|
type: "string", |
||||
|
}, |
||||
|
isReturn: { |
||||
|
title: "是否退货", |
||||
|
type: "boolean", |
||||
|
}, |
||||
|
isMaidan: { |
||||
|
title: "是否买单", |
||||
|
type: "boolean", |
||||
|
}, |
||||
|
contractDocID: { |
||||
|
title: "合同号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
|
||||
|
export default function (businessType) { |
||||
|
let service; |
||||
|
if (businessType === "JisBBAC") { |
||||
|
service = "bbac_can_sa_service"; |
||||
|
} else if (businessType === "JisHBPO") { |
||||
|
service = "hbpo_can_sa_service"; |
||||
|
} else { |
||||
|
service = "pub_can_sa_service"; |
||||
|
} |
||||
|
if (businessType === "JisBBAC" || businessType === "JisHBPO") { |
||||
|
schema.properties.pn.title = "生产码"; |
||||
|
} |
||||
|
if (businessType !== "JisBBAC") { |
||||
|
delete schema.properties["isReturn"]; |
||||
|
delete schema.properties["isMaidan"]; |
||||
|
delete schema.properties["contractDocID"]; |
||||
|
} |
||||
|
if (businessType !== "JisHBPO") { |
||||
|
delete schema.properties["site"]; |
||||
|
} |
||||
|
const queryUrl = `settleaccount/${service}/detail-query`; |
||||
|
const queryMethod = "POST"; |
||||
|
|
||||
|
return { |
||||
|
query: { |
||||
|
url: queryUrl, |
||||
|
method: queryMethod, |
||||
|
hasFilter: true, |
||||
|
schema: { |
||||
|
title: "通用代码", |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
filters: { |
||||
|
title: "筛选", |
||||
|
type: "array", |
||||
|
hidden: true, |
||||
|
items: { |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
logic: { |
||||
|
type: "int", |
||||
|
}, |
||||
|
column: { |
||||
|
type: "string", |
||||
|
}, |
||||
|
action: { |
||||
|
type: "int", |
||||
|
}, |
||||
|
value: { |
||||
|
type: "string", |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
default: [ |
||||
|
{ |
||||
|
logic: "and", |
||||
|
action: "like", |
||||
|
column: "partCode", |
||||
|
value: null, |
||||
|
readOnly: true, |
||||
|
}, |
||||
|
{ |
||||
|
logic: "and", |
||||
|
action: "like", |
||||
|
column: "pn", |
||||
|
value: null, |
||||
|
readOnly: true, |
||||
|
}, |
||||
|
{ |
||||
|
logic: "and", |
||||
|
action: "like", |
||||
|
column: "groupNum", |
||||
|
value: null, |
||||
|
readOnly: true, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
skipCount: { |
||||
|
hidden: true, |
||||
|
default: 0, |
||||
|
}, |
||||
|
maxResultCount: { |
||||
|
hidden: true, |
||||
|
default: 10, |
||||
|
}, |
||||
|
sorting: { |
||||
|
hidden: true, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
table: { |
||||
|
schema: schema, |
||||
|
}, |
||||
|
edit: { |
||||
|
schema: schema, |
||||
|
}, |
||||
|
}; |
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
import version from "../version.js"; |
||||
|
import state from "../state.js"; |
||||
|
|
||||
|
const schema = { |
||||
|
title: "不可结算明细", |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
version, |
||||
|
state, |
||||
|
billNum: { |
||||
|
title: "结算单据", |
||||
|
type: "string", |
||||
|
}, |
||||
|
settleBillNum: { |
||||
|
title: "关联结算单号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
invGroupNum: { |
||||
|
title: "发票分组号", |
||||
|
type: "string", |
||||
|
oneToMany: "/settle/detail", |
||||
|
config: "/models/settle/detail.js", |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
|
||||
|
export default function (service) { |
||||
|
const queryUrl = `settleaccount/${service}/detail-query`; |
||||
|
const exportUrl = `settleaccount/${service}/export`; |
||||
|
const addUrl = `settleaccount/${service}/generate-settlement-order`; |
||||
|
|
||||
|
const queryMethod = "POST"; |
||||
|
const exportMethod = "POST"; |
||||
|
const addMethod = "POST"; |
||||
|
|
||||
|
return { |
||||
|
query: { |
||||
|
url: queryUrl, |
||||
|
method: queryMethod, |
||||
|
hasFilter: true, |
||||
|
schema: { |
||||
|
title: "发票分组号", |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
filters: { |
||||
|
title: "项目", |
||||
|
type: "array", |
||||
|
hidden: true, |
||||
|
items: { |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
logic: { |
||||
|
type: "int", |
||||
|
}, |
||||
|
column: { |
||||
|
type: "string", |
||||
|
}, |
||||
|
action: { |
||||
|
type: "int", |
||||
|
}, |
||||
|
value: { |
||||
|
type: "string", |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
default: [ |
||||
|
{ |
||||
|
logic: "and", |
||||
|
column: "version", |
||||
|
action: "equal", |
||||
|
value: null, |
||||
|
readOnly: true, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
skipCount: { |
||||
|
hidden: true, |
||||
|
default: 0, |
||||
|
}, |
||||
|
maxResultCount: { |
||||
|
hidden: true, |
||||
|
default: 10, |
||||
|
}, |
||||
|
sorting: { |
||||
|
hidden: true, |
||||
|
}, |
||||
|
businessType: { |
||||
|
hidden: true, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
table: { |
||||
|
schema: schema, |
||||
|
}, |
||||
|
edit: { |
||||
|
exportUrl, |
||||
|
addUrl, |
||||
|
exportMethod, |
||||
|
addMethod, |
||||
|
schema: schema, |
||||
|
}, |
||||
|
}; |
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
import version from "../version.js"; |
||||
|
import state from "../state.js"; |
||||
|
|
||||
|
const schema = { |
||||
|
title: "可结算单", |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
version, |
||||
|
state, |
||||
|
billNum: { |
||||
|
title: "结算单据", |
||||
|
type: "string", |
||||
|
oneToMany: "/settle/detail", |
||||
|
config: "/models/settle/detail.js", |
||||
|
}, |
||||
|
settleBillNum: { |
||||
|
title: "关联结算单号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
invGroupNum: { |
||||
|
title: "发票分组号", |
||||
|
type: "string", |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
|
||||
|
export default function (service) { |
||||
|
const queryUrl = `settleaccount/${service}/main-query`; |
||||
|
const exportUrl = `settleaccount/${service}/export`; |
||||
|
const addUrl = `settleaccount/${service}/generate-invoice`; |
||||
|
|
||||
|
const queryMethod = "POST"; |
||||
|
const exportMethod = "POST"; |
||||
|
const addMethod = "POST"; |
||||
|
|
||||
|
return { |
||||
|
query: { |
||||
|
url: queryUrl, |
||||
|
method: queryMethod, |
||||
|
hasFilter: true, |
||||
|
schema: { |
||||
|
title: "发票分组号", |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
filters: { |
||||
|
title: "项目", |
||||
|
type: "array", |
||||
|
hidden: true, |
||||
|
items: { |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
logic: { |
||||
|
type: "int", |
||||
|
}, |
||||
|
column: { |
||||
|
type: "string", |
||||
|
}, |
||||
|
action: { |
||||
|
type: "int", |
||||
|
}, |
||||
|
value: { |
||||
|
type: "string", |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
default: [ |
||||
|
{ |
||||
|
logic: "and", |
||||
|
column: "version", |
||||
|
action: "equal", |
||||
|
value: null, |
||||
|
readOnly: true, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
skipCount: { |
||||
|
hidden: true, |
||||
|
default: 0, |
||||
|
}, |
||||
|
maxResultCount: { |
||||
|
hidden: true, |
||||
|
default: 10, |
||||
|
}, |
||||
|
sorting: { |
||||
|
hidden: true, |
||||
|
}, |
||||
|
businessType: { |
||||
|
hidden: true, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
table: { |
||||
|
schema: schema, |
||||
|
}, |
||||
|
edit: { |
||||
|
exportUrl, |
||||
|
addUrl, |
||||
|
exportMethod, |
||||
|
addMethod, |
||||
|
schema: schema, |
||||
|
}, |
||||
|
}; |
||||
|
} |
@ -1,14 +1,14 @@ |
|||||
const options = [ |
const options = [ |
||||
{ value: 0, label: "未结状态" }, |
{ value: "0", label: "未结状态" }, |
||||
{ value: 1, label: "已开票" }, |
{ value: "1", label: "已开票" }, |
||||
{ value: 2, label: "商务已审核" }, |
{ value: "2", label: "商务已审核" }, |
||||
{ value: 3, label: "财务已审核" }, |
{ value: "3", label: "财务已审核" }, |
||||
{ value: 4, label: "客户已收票" }, |
{ value: "4", label: "客户已收票" }, |
||||
{ value: 5, label: "已扣减" }, |
{ value: "5", label: "已扣减" }, |
||||
]; |
]; |
||||
const state = { title: "状态", type: "string", input: "select", options }; |
const state = { title: "状态", type: "string", input: "select", options }; |
||||
const state2 = Object.assign(Object.assign({}, state), { options: options.filter((a) => a.value > 0) }); |
const state2 = Object.assign(Object.assign({}, state), { options: options.filter((a) => parseInt(a.value) > 0) }); |
||||
const state3 = Object.assign(Object.assign({}, state), { options: options.filter((a) => a.value > 3) }); |
const state3 = Object.assign(Object.assign({}, state), { options: options.filter((a) => parseInt(a.value) > 3) }); |
||||
|
|
||||
export default state; |
export default state; |
||||
export { state2, state3 }; |
export { state2, state3 }; |
File diff suppressed because it is too large
@ -0,0 +1,15 @@ |
|||||
|
import AppList from "../../components/list/index.js"; |
||||
|
import html from "html"; |
||||
|
import useConfig from "../../models/settle/detail.js"; |
||||
|
|
||||
|
export default { |
||||
|
components: { AppList }, |
||||
|
template: html`<app-list :config="config" @command="onCommand" />`, |
||||
|
setup() { |
||||
|
config = useConfig("pub_can_sa_service"); |
||||
|
const onCommand = async (item, rows) => { |
||||
|
console.log(item.path, item, rows); |
||||
|
}; |
||||
|
return { config, onCommand }; |
||||
|
}, |
||||
|
}; |
@ -0,0 +1,26 @@ |
|||||
|
import AppList from "../../components/list/index.js"; |
||||
|
import html from "html"; |
||||
|
import { useRoute } from "vue-router"; |
||||
|
import useConfig from "../../models/settle/unable.js"; |
||||
|
import request from "../../request/index.js"; |
||||
|
|
||||
|
export default { |
||||
|
components: { AppList }, |
||||
|
template: html`<app-list :config="config" @command="onCommand" />`, |
||||
|
setup() { |
||||
|
const route = useRoute(); |
||||
|
const businessType = route.meta.businessType; |
||||
|
let config = null; |
||||
|
if (businessType === "JisBBAC") { |
||||
|
config = useConfig("bbac_not_sa_service"); |
||||
|
} else if (businessType === "JisHBPO") { |
||||
|
config = useConfig("hbpo_not_sa_service"); |
||||
|
} else { |
||||
|
config = useConfig("pub_not_sa_service"); |
||||
|
} |
||||
|
const onCommand = async (item, rows) => { |
||||
|
console.log(item.path, item, rows); |
||||
|
}; |
||||
|
return { config, onCommand }; |
||||
|
}, |
||||
|
}; |
@ -0,0 +1,26 @@ |
|||||
|
import AppList from "../../components/list/index.js"; |
||||
|
import html from "html"; |
||||
|
import { useRoute } from "vue-router"; |
||||
|
import useConfig from "../../models/settle/usable.js"; |
||||
|
import request from "../../request/index.js"; |
||||
|
|
||||
|
export default { |
||||
|
components: { AppList }, |
||||
|
template: html`<app-list :config="config" @command="onCommand" />`, |
||||
|
setup() { |
||||
|
const route = useRoute(); |
||||
|
const businessType = route.meta.businessType; |
||||
|
let config = null; |
||||
|
if (businessType === "JisBBAC") { |
||||
|
config = useConfig("bbac_can_sa_service"); |
||||
|
} else if (businessType === "JisHBPO") { |
||||
|
config = useConfig("hbpo_can_sa_service"); |
||||
|
} else { |
||||
|
config = useConfig("pub_can_sa_service"); |
||||
|
} |
||||
|
const onCommand = async (item, rows) => { |
||||
|
console.log(item.path, item, rows); |
||||
|
}; |
||||
|
return { config, onCommand }; |
||||
|
}, |
||||
|
}; |
File diff suppressed because it is too large
Loading…
Reference in new issue