update 物料配方“
This commit is contained in:
父節點
7d0c66ad73
當前提交
0f0226eaa1
@ -61,6 +61,9 @@
|
||||
<el-row v-for="(row, rowIndex) in configs.form.rows" :key="'row_' + rowIndex" :gutter="20">
|
||||
<el-col v-for="(col, colIndex) in row" :key="colIndex" :span="24 / row.length">
|
||||
<el-form-item :label="col.label" :prop="col.prop" :rules="col.rules || null">
|
||||
<div v-if="col.forceDisabled" class="force-disabled">
|
||||
<el-tag :key="col.key" :type="col.type">{{ dataForm[col.prop] || "-" }}</el-tag>
|
||||
</div>
|
||||
<el-input v-if="col.input" v-model="dataForm[col.prop]" clearable :disabled="disableCondition(col.prop)" v-bind="col.elparams" />
|
||||
<el-cascader
|
||||
v-if="col.cascader"
|
||||
@ -449,7 +452,7 @@ export default {
|
||||
}
|
||||
this.loadingStatus = false;
|
||||
// 是否要跳转到附件页
|
||||
if (menu && menu.key === "attachment") {
|
||||
if (menu && menu.key) {
|
||||
this.activeMenu = this.configs.menu.find((item) => item.key === menu.key)?.name;
|
||||
}
|
||||
});
|
||||
@ -881,4 +884,8 @@ ul.file-list > li:hover {
|
||||
|
||||
/* .image-preview-dialog {
|
||||
} */
|
||||
|
||||
.force-disabled {
|
||||
margin-top: 42px;
|
||||
}
|
||||
</style>
|
||||
|
@ -210,4 +210,8 @@ export default {
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.a-small-dialog >>> .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
@ -31,6 +31,7 @@ export default {
|
||||
// viewAttr: i18n.t('viewattr'),
|
||||
// preview: i18n.t('preview'),
|
||||
// design: i18n.t('design'),
|
||||
copy: '复制',
|
||||
edit: '编辑',
|
||||
detail: '详情',
|
||||
delete: '删除',
|
||||
|
@ -216,15 +216,45 @@ export default {
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: 'error',
|
||||
duration: 1500
|
||||
})
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
case "view-attachment": {
|
||||
this.openDialog(data, false, { key: "attachment" });
|
||||
break;
|
||||
}
|
||||
case "view-recipe": {
|
||||
this.openDialog(data, false, { key: "attr" });
|
||||
break;
|
||||
}
|
||||
case "copy": {
|
||||
return this.$http
|
||||
.post(this.urls.copyUrl, data, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.$message({
|
||||
message: "复制成功!",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
});
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
.catch((errMsg) => {
|
||||
this.$message({
|
||||
message: errMsg,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -237,17 +267,24 @@ export default {
|
||||
break;
|
||||
case "查询": {
|
||||
const params = {};
|
||||
this.listQueryExtra?.map(cond => {
|
||||
this.listQueryExtra?.map((cond) => {
|
||||
if (!!payload[cond]) {
|
||||
params[cond] = payload[cond]
|
||||
params[cond] = payload[cond];
|
||||
} else {
|
||||
params[cond] = ''
|
||||
params[cond] = "";
|
||||
}
|
||||
});
|
||||
console.log("查询", params);
|
||||
this.getList(params);
|
||||
break;
|
||||
}
|
||||
case "同步":
|
||||
this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -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",
|
||||
},
|
||||
|
載入中…
新增問題並參考
Block a user