update 2023.4.6

This commit is contained in:
lb
2023-04-06 09:52:41 +08:00
parent aa91d41412
commit 247cca284e
6 changed files with 229 additions and 41 deletions

View File

@@ -6,17 +6,19 @@ import { timeFilter, dictFilter } from "@/utils/filters";
export default function () {
const tableProps = [
{ type: 'index', label: '序号' },
{ prop: "name", label: "原料名称" },
{ prop: "code", label: "原料编码" },
{ prop: "typeDictValue", label: "类别", filter: dictFilter("material_category") }, // subcomponent: {/** TODO: create a new component for this option */} },
{ prop: "type", label: "原料类型" },
{ prop: "brandsOwner", label: "品牌" },
{ prop: "description", label: "原料描述", },
{ prop: "name", label: "原料名称" },
{ prop: "typeDictValue", label: "类型", filter: dictFilter("material_category") }, // subcomponent: {/** TODO: create a new component for this option */} },
{ prop: "baseMaterialCode", label: "基础原料编码" },
{ prop: "baseMaterialDescription", label: "基础原料描述" },
// { prop: "type", label: "原料类型" },
{ prop: "density", label: "堆积密度" },
// { prop: "brandsOwner", label: "品牌" },
{ prop: "dosLow", label: "加料下限" },
{ prop: "dosHigh", label: "加料上限" },
{ prop: "density", label: "堆积密度" },
// { prop: "description", label: "详情", subcomponent: TableTextComponent },
{ prop: "description", label: "原料描述", },
{ prop: "remark", label: "中文描述" },
// { prop: "remark", label: "中文描述" },
{ prop: "createTime", label: "添加时间", filter: timeFilter },
/** TODO: parentId 是用来前端重构成树形结构的... */
{
@@ -87,13 +89,8 @@ export default function () {
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入原料编码" },
},
{
select: true,
label: "单位",
prop: "unitDictValue",
options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })),
elparams: { placeholder: "单位" },
},
{ input: true, label: "原料描述", prop: "description", elparams: { placeholder: "原料描述" } },
],
[
// {
@@ -114,16 +111,17 @@ export default function () {
// // },
// // elparams: { placeholder: "请选择父级原料", 'show-all-levels': false, props: { checkStrictly: true } },
// },
{
select: true,
label: "原料类型",
prop: "typeId",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
options: [],
fetchData: () => this.$http.get('/pms/materialType/page', { params: { page: 1, limit: 999 } }),
elparams: { placeholder: "请输入原料类型" },
// autoDisabled: true, // 有某个条件触发后,自动变成 disabled 状态
},
// {
// select: true,
// label: "原料类型",
// prop: "typeId",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
// options: [],
// fetchData: () => this.$http.get('/pms/materialType/page', { params: { page: 1, limit: 999 } }),
// elparams: { placeholder: "请输入原料类型" },
// // autoDisabled: true, // 有某个条件触发后,自动变成 disabled 状态
// },
{
select: true,
label: "原料类别",
@@ -132,6 +130,14 @@ export default function () {
elparams: { placeholder: "原料类别" },
// autoDisabled: true
},
{
select: true,
label: "基础原料",
prop: "baseMaterialId",
options: [],
fetchData: () => this.$http.get('/pms/baseMaterial/page', { params: { limit: 999, page: 1, key: '' } }),
elparams: { placeholder: "请选择基础原料" },
},
{ input: true, label: "堆积密度(g/cm³)", prop: "density", elparams: { placeholder: "堆积密度" } },
// {
// input: true,
@@ -162,24 +168,31 @@ export default function () {
],
elparams: { placeholder: "请输入加料上限" },
},
{
input: true,
label: "品牌",
prop: "brandsOwner",
elparams: { placeholder: "请输入品牌" },
},
],
[
{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "请输入备注" } },
// {
// input: true,
// label: "缩写",
// prop: "enAb",
// elparams: { placeholder: "请输入缩写" },
// select: true,
// label: "单位",
// prop: "unitDictValue",
// options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })),
// elparams: { placeholder: "单位" },
// },
{ input: true, label: "原料描述", prop: "description", elparams: { placeholder: "原料描述" } },
{ input: true, label: "中文描述", prop: "remark", elparams: { placeholder: "备注" } },
{}
],
// [
// {
// input: true,
// label: "缩写",
// prop: "enAb",
// elparams: { placeholder: "请输入缩写" },
// },
// {
// input: true,
// label: "品牌",
// prop: "brandsOwner",
// elparams: { placeholder: "请输入品牌" },
// },
// { input: true, label: "中文描述", prop: "remark", elparams: { placeholder: "备注" } },
// ],
],
operations: [
{ name: "add", label: "保存", type: "primary", permission: "pms:material:save", showOnEdit: false },