update 物料配方“

This commit is contained in:
lb
2023-02-20 13:48:49 +08:00
parent 7d0c66ad73
commit 0f0226eaa1
5 changed files with 77 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
import TableTextComponent from "@/components/noTemplateComponents/detailComponent";
import { timeFilter, dictFilter } from "@/utils/filters";
import switchBtn from "@/components/noTemplateComponents/switchBtn";
// import switchBtn from "@/components/noTemplateComponents/switchBtn";
export default function () {
const tableProps = [
@@ -13,8 +13,8 @@ export default function () {
// { prop: "specifications", label: "程序号" },
// { prop: "unitDictValue", label: "砖型", filter: dictFilter("unit") },
// { prop: "unitDictValue", label: "物料号", filter: dictFilter("unit") },
{ prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
{ prop: "sumqty", label: "配方总重量" },
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
{ prop: "sumqty", label: "配方总重量[kg]", filter: val => !!val ? val + ' kg' : '-' },
{ prop: "sync", label: "同步状态" },
{ prop: "remark", label: "备注" },
{ prop: "description", label: "详情", subcomponent: TableTextComponent, buttonContent: "查看配方详情", actionName: 'view-recipe' },
@@ -22,9 +22,9 @@ export default function () {
prop: "operations",
name: "操作",
fixed: "right",
width: 120,
width: 160,
subcomponent: TableOperaionComponent,
options: ["edit", { name: "delete", emitFull: true, permission: "pms:bom:delete" }],
options: ["copy", "edit", { name: "delete", emitFull: true, permission: "pms:bom:delete" }],
},
];
@@ -49,6 +49,13 @@ export default function () {
permission: "pms:bom:save",
},
},
{
button: {
// type: "plain",
name: "同步",
type: 'primary'
},
},
];
const dictList = JSON.parse(localStorage.getItem("dictList") || {});
@@ -106,9 +113,11 @@ export default function () {
elparams: { placeholder: "请输入版本号" },
},
{
input: true,
// input: true,
forceDisabled: true,
label: "同步状态",
prop: "sync",
key: 'sync',
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入同步状态" },
},
@@ -129,9 +138,9 @@ export default function () {
{ type: "index", label: "序号" },
{ prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "material", label: "物料", isEditField: true },
{ prop: "qty", label: "配方物料重量", isEditField: true },
{ prop: "sumqty", label: "配方总重量", isEditField: true },
{ prop: "percent", label: "配比", isEditField: true },
{ prop: "qty", label: "配方物料重量[kg]", filter: val => !!val ? val + ' kg' : '-', isEditField: true },
{ prop: "sumqty", label: "配方总重量[kg]", filter: val => !!val ? val + ' kg' : '-', isEditField: true },
{ prop: "percent", label: "配比[%]", filter: val => !!val ? val + ' %' : '-', isEditField: true },
{ prop: "remark", label: "备注", isEditField: true },
{
prop: "operations",
@@ -186,7 +195,7 @@ export default function () {
},
{
input: true,
label: "物料重量",
label: "物料重量[kg]",
prop: "qty",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入物料重量" },
@@ -214,6 +223,8 @@ export default function () {
urls: {
base: "/pms/bom",
page: "/pms/bom/page",
syncUrl: "/pms/bom/sync",
copyUrl: "/pms/bom/copy",
subase: "/pms/bomMaterial",
subpage: "/pms/bomMaterial/page",
},