姜旭之
1 year ago
13 changed files with 306 additions and 34 deletions
@ -0,0 +1 @@ |
|||
[导入模板下载](/assets/导入模版.zip) |
Binary file not shown.
@ -0,0 +1,91 @@ |
|||
const schema = { |
|||
title: "物料主数据", |
|||
type: "object", |
|||
properties: { |
|||
erpMaterialCode: { |
|||
title: "厂内零件号", |
|||
type: "string", |
|||
}, |
|||
settleMaterialCode: { |
|||
title: "客户零件号", |
|||
type: "string", |
|||
}, |
|||
materialDesc: { |
|||
title: "物料描述", |
|||
type: "string", |
|||
}, |
|||
}, |
|||
}; |
|||
|
|||
const baseUrl = "settleaccount/material-relationship"; |
|||
const queryUrl = `${baseUrl}/get-list`; |
|||
const exportUrl = `${baseUrl}/export`; |
|||
const queryMethod = "POST"; |
|||
const exportMethod = "POST"; |
|||
|
|||
export default function () { |
|||
return { |
|||
baseUrl, |
|||
query: { |
|||
url: queryUrl, |
|||
method: queryMethod, |
|||
schema: { |
|||
title: "物料主数据", |
|||
type: "object", |
|||
properties: { |
|||
filters: { |
|||
type: "array", |
|||
hidden: true, |
|||
items: { |
|||
type: "object", |
|||
properties: { |
|||
logic: { |
|||
type: "int", |
|||
}, |
|||
column: { |
|||
type: "string", |
|||
}, |
|||
action: { |
|||
type: "int", |
|||
}, |
|||
value: { |
|||
type: "string", |
|||
}, |
|||
}, |
|||
}, |
|||
default: [ |
|||
{ |
|||
logic: "and", |
|||
column: "erpMaterialCode", |
|||
action: "like", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
], |
|||
}, |
|||
skipCount: { |
|||
hidden: true, |
|||
default: 0, |
|||
}, |
|||
maxResultCount: { |
|||
hidden: true, |
|||
default: 10, |
|||
}, |
|||
sorting: { |
|||
hidden: true, |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
table: { |
|||
schema: schema, |
|||
}, |
|||
edit: { |
|||
queryUrl, |
|||
exportUrl, |
|||
queryMethod, |
|||
exportMethod, |
|||
schema: schema, |
|||
}, |
|||
}; |
|||
} |
@ -0,0 +1,99 @@ |
|||
const schema = { |
|||
title: "物料主数据", |
|||
type: "object", |
|||
properties: { |
|||
factory: { |
|||
title: "客户物料号", |
|||
type: "string", |
|||
}, |
|||
materialCode: { |
|||
title: "厂内物料号", |
|||
type: "string", |
|||
}, |
|||
materialDesc: { |
|||
title: "物料描述", |
|||
type: "string", |
|||
}, |
|||
unit: { |
|||
title: "基本计量单位", |
|||
type: "string", |
|||
}, |
|||
estimateType: { |
|||
title: "产品类型", |
|||
type: "string", |
|||
}, |
|||
}, |
|||
}; |
|||
|
|||
const baseUrl = "settleaccount/material"; |
|||
const queryUrl = `${baseUrl}/get-list`; |
|||
const exportUrl = `${baseUrl}/export`; |
|||
const queryMethod = "POST"; |
|||
const exportMethod = "POST"; |
|||
|
|||
export default function () { |
|||
return { |
|||
baseUrl, |
|||
query: { |
|||
url: queryUrl, |
|||
method: queryMethod, |
|||
schema: { |
|||
title: "物料主数据", |
|||
type: "object", |
|||
properties: { |
|||
filters: { |
|||
type: "array", |
|||
hidden: true, |
|||
items: { |
|||
type: "object", |
|||
properties: { |
|||
logic: { |
|||
type: "int", |
|||
}, |
|||
column: { |
|||
type: "string", |
|||
}, |
|||
action: { |
|||
type: "int", |
|||
}, |
|||
value: { |
|||
type: "string", |
|||
}, |
|||
}, |
|||
}, |
|||
default: [ |
|||
{ |
|||
logic: "and", |
|||
column: "materialCode", |
|||
action: "like", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
], |
|||
}, |
|||
skipCount: { |
|||
hidden: true, |
|||
default: 0, |
|||
}, |
|||
maxResultCount: { |
|||
hidden: true, |
|||
default: 10, |
|||
}, |
|||
sorting: { |
|||
hidden: true, |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
table: { |
|||
schema: schema, |
|||
}, |
|||
edit: { |
|||
queryUrl, |
|||
exportUrl, |
|||
queryMethod, |
|||
exportMethod, |
|||
schema: schema, |
|||
}, |
|||
}; |
|||
} |
@ -0,0 +1,15 @@ |
|||
import AppList from "../../components/list/index.js"; |
|||
import html from "html"; |
|||
import useConfig from "../../models/material-relationship.js"; |
|||
|
|||
export default { |
|||
components: { AppList }, |
|||
template: html`<app-list :config="config" @command="onCommand" />`, |
|||
setup() { |
|||
const config = useConfig(); |
|||
const onCommand = async (item, rows) => { |
|||
console.log(item.path, item, rows); |
|||
}; |
|||
return { config, onCommand }; |
|||
}, |
|||
}; |
@ -1,7 +1,7 @@ |
|||
import html from 'html'; |
|||
import Md from '../components/markdown/index.js' |
|||
import html from "html"; |
|||
import Md from "../components/markdown/index.js"; |
|||
|
|||
export default { |
|||
components: { Md }, |
|||
template: html`Home <md name="test"></md>` |
|||
} |
|||
template: html`<md name="home" />`, |
|||
}; |
|||
|
Loading…
Reference in new issue