姜旭之
1 year ago
8 changed files with 328 additions and 63 deletions
@ -0,0 +1,22 @@ |
|||||
|
const options1 = [ |
||||
|
{ value: 0, label: "无" }, |
||||
|
{ value: 1, label: "JIS件" }, |
||||
|
{ value: 2, label: "JIT直供件" }, |
||||
|
{ value: 3, label: "印度件" }, |
||||
|
{ value: 4, label: "北汽4S备件" }, |
||||
|
]; |
||||
|
const options2 = [ |
||||
|
{ value: "01", label: "前保" }, |
||||
|
{ value: " 02", label: "后保" }, |
||||
|
{ value: "03", label: " 左门槛" }, |
||||
|
{ value: "04", label: "右门槛" }, |
||||
|
{ value: "05", label: "扰流板" }, |
||||
|
{ value: "06", label: "前左轮眉" }, |
||||
|
{ value: "07", label: "前右轮眉 " }, |
||||
|
{ value: "08", label: "后左轮眉" }, |
||||
|
{ value: "09", label: "后右轮眉" }, |
||||
|
]; |
||||
|
const proType = { title: "发货类型", type: "number", input: "select", options: options1 }; |
||||
|
const codeType = { title: "生产码类型", type: "string", input: "select", options: options2 }; |
||||
|
|
||||
|
export { proType, codeType }; |
@ -0,0 +1,132 @@ |
|||||
|
const schema = { |
||||
|
title: "通用代码", |
||||
|
type: "object", |
||||
|
properties: { |
||||
|
project: { |
||||
|
title: "项目", |
||||
|
type: "string", |
||||
|
readOnly: true, |
||||
|
showForList: true, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
value: { |
||||
|
title: "值", |
||||
|
type: "string", |
||||
|
readOnly: true, |
||||
|
showForList: true, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
description: { |
||||
|
title: "描述", |
||||
|
type: "string", |
||||
|
input: "textarea", |
||||
|
showForList: true, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
}, |
||||
|
{ max: 60 }, |
||||
|
], |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
|
||||
|
const baseUrl = "settleaccount/code-setting"; |
||||
|
const queryUrl = `${baseUrl}/get-list`; |
||||
|
const detailsUrl = `${baseUrl}/get/%s`; |
||||
|
const createUrl = `${baseUrl}/create`; |
||||
|
const updateUrl = `${baseUrl}/update/%s`; |
||||
|
const deleteUrl = `${baseUrl}/delete-list`; |
||||
|
const importUrl = `${baseUrl}/code-setting-upload-excel-import`; |
||||
|
const exportUrl = `${baseUrl}/export`; |
||||
|
const queryMethod = "POST"; |
||||
|
const detailsMethod = "POST"; |
||||
|
const createMethod = "POST"; |
||||
|
const updateMethod = "POST"; |
||||
|
const deleteMethod = "POST"; |
||||
|
const importMethod = "POST"; |
||||
|
const exportMethod = "POST"; |
||||
|
|
||||
|
export default function () { |
||||
|
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: "project", |
||||
|
action: "like", |
||||
|
value: null, |
||||
|
readOnly: true, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
skipCount: { |
||||
|
hidden: true, |
||||
|
default: 0, |
||||
|
}, |
||||
|
maxResultCount: { |
||||
|
hidden: true, |
||||
|
default: 10, |
||||
|
}, |
||||
|
sorting: { |
||||
|
hidden: true, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
table: { |
||||
|
schema: schema, |
||||
|
}, |
||||
|
edit: { |
||||
|
detailsUrl, |
||||
|
createUrl, |
||||
|
updateUrl, |
||||
|
deleteUrl, |
||||
|
importUrl, |
||||
|
exportUrl, |
||||
|
detailsMethod, |
||||
|
createMethod, |
||||
|
updateMethod, |
||||
|
deleteMethod, |
||||
|
importMethod, |
||||
|
exportMethod, |
||||
|
schema: schema, |
||||
|
}, |
||||
|
}; |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
import AppList from "../../components/list/index.js"; |
||||
|
import html from "html"; |
||||
|
import useConfig from "../../models/tb_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 }; |
||||
|
}, |
||||
|
}; |
Loading…
Reference in new issue