This commit is contained in:
lb
2023-02-23 15:17:35 +08:00
parent 39386d9da9
commit c3dfc401a9
4 changed files with 85 additions and 54 deletions

View File

@@ -1,15 +1,17 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
import switchBtn from "@/components/noTemplateComponents/switchBtn";
import request from "@/utils/request";
import { timeFilter } from '@/utils/filters'
import { timeFilter } from "@/utils/filters";
export default function () {
const tableProps = [
{ type: 'index', label: '序号' },
{ type: "index", label: "序号" },
{ prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "name", label: "砖型名称" },
{ prop: "code", label: "砖型编码" },
{ prop: "specifications", label: "规格" },
{ prop: "externalCode", label: "砖型ID" },
{ prop: "description", label: "长描述" },
{ prop: "shortDesc", label: "短描述" },
{ prop: "remark", label: "备注" },
{
prop: "operations",
@@ -23,13 +25,13 @@ export default function () {
const headFormFields = [
{
prop: 'key',
prop: "key",
label: "砖型名称/编码",
input: true,
default: { value: "" },
bind: {
placeholder: '请输入砖型名称或编码'
}
placeholder: "请输入砖型名称或编码",
},
},
{
button: {
@@ -41,11 +43,11 @@ export default function () {
button: {
type: "primary",
name: "新增",
permission: "pms:shape:save"
permission: "pms:shape:save",
},
bind: {
plain: true,
}
},
},
];
@@ -93,7 +95,19 @@ export default function () {
// elparams: { placeholder: "设定TT值每小时下片数量" },
// },
// ],
[{ input: true, label: "规格", prop: "specifications", elparams: { placeholder: "规格" } }, { input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
[
// { input: true, label: "规格", prop: "specifications", elparams: { placeholder: "规格" } },
{
input: true,
label: "砖型ID",
prop: "externalCode",
rules: [{ type: 'number', trigger: "blur", message: "请输入数字类型", transform: val => Number(val) }],
elparams: { placeholder: "外部编码" },
},
{ input: true, label: "短描述", prop: "shortDesc", elparams: { placeholder: "短描述" } },
],
[{ textarea: true, label: "描述", prop: "description", elparams: { placeholder: "描述" } }],
[{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
],
operations: [
{ name: "add", label: "保存", type: "primary", permission: "pms:shape:save", showOnEdit: false },