bugfix 0720 bomTechAndFiring

This commit is contained in:
lb 2023-07-21 11:03:23 +08:00
джерело ab24d8b558
коміт be39723748
5 змінених файлів з 79 додано та 69 видалено

@ -22,8 +22,13 @@
<el-form ref="dataForm" :model="dataForm" v-loading="loading">
<el-row :gutter="20">
<el-col>
<el-form-item label="bom" prop="bomId" :rules="rules.bom">
<el-input v-model="dataForm.bomId" clearable disabled></el-input>
<el-form-item label="配方号" prop="code" :rules="rules.code">
<el-input v-model="dataForm.code" clearable disabled></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="牌号" prop="name" :rules="rules.name">
<el-input v-model="dataForm.name" clearable disabled></el-input>
</el-form-item>
</el-col>
<el-col>
@ -43,7 +48,7 @@
<!-- footer -->
<div slot="footer">
<!-- <el-button @click="handleBtnClick('保存')">保存</el-button> -->
<el-button type="primary" @click="handleBtnClick('更新')">更新</el-button>
<el-button type="primary" @click="handleBtnClick('更新')" :loading="btnLoading">更新</el-button>
<el-button @click="handleBtnClick('取消')">取消</el-button>
</div>
</el-dialog>
@ -60,14 +65,17 @@ export default {
loading: false,
dataForm: {
id: null,
bomId: null,
techId: null,
code: null,
name: null,
},
rules: {
bom: [],
tech: [{ required: true, message: "必填项不能为空", trigger: "blur" }],
code: [],
name: [],
tech: []
// name: [{ required: true, message: "", trigger: "blur" }],
},
techList: [],
btnLoading: false,
};
},
computed: {},
@ -78,10 +86,12 @@ export default {
},
methods: {
//
init({ id, bomId, techId }) {
init({ id, code, name, techId, bomId }) {
this.$set(this.dataForm, "id", id);
this.$set(this.dataForm, "bomId", bomId);
this.$set(this.dataForm, "code", code);
this.$set(this.dataForm, "name", name);
this.$set(this.dataForm, "techId", techId);
this.$set(this.dataForm, "bomId", bomId);
},
//
async getTechList() {
@ -103,13 +113,6 @@ export default {
}
},
//
async push(type = "add") {
if (type == "add") {
} else if (type == "update") {
}
},
//
handleBtnClick(type) {
switch (type) {
@ -123,14 +126,22 @@ export default {
case "更新":
this.$refs.dataForm.validate((valid) => {
if (valid) {
this.$http.put("/pms/bomTech", this.dataForm).then((res) => {
if (res.data.code == 0) {
this.$message.success("更新成功");
this.handleClose(true);
} else {
this.$message.error(res.data.msg);
}
});
this.btnLoading = true;
this.$http
.put("/pms/bomTech", {
id: this.dataForm.id,
techId: this.dataForm.techId,
bomId: this.dataForm.bomId,
})
.then((res) => {
if (res.data.code == 0) {
this.$message.success("更新成功");
this.handleClose(true);
} else {
this.$message.error(res.data.msg);
}
this.btnLoading = false;
});
}
});
break;

@ -201,9 +201,11 @@ export default {
this.editVisible = true;
this.$nextTick(() => {
this.$refs.edit.init({
id: data.bomTechId,
bomId: data.id,
techId: data.techId,
id: data.bomTechId, //
code: data.code, //
name: data.name, //
techId: data.techId, //
bomId: data.id //
});
});
break;

@ -11,7 +11,7 @@ export default function () {
{ prop: "code", label: "料仓编码" },
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') },
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
{ prop: "material", label: "原料" },
{ prop: "materialDescription", label: "原料" },
{ prop: "qty", label: "料位" },
// { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') },
{ prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter('material_category') },

@ -26,20 +26,20 @@ export default function () {
// { name: 'confirm-order', label: '确认', icon: 'success', showText: true },
{ name: "view-ongoing", label: "查看详情", icon: "view", emitFull: true },
{ name: "end-order", label: "结束", icon: "finished" },
{ name: "move-up", label: "上移", icon: "arrow-up" },
{ name: "move-down", label: "下移", icon: "arrow-down" },
{ name: "move-to-top", label: "至顶", icon: "upload2" },
{ name: "move-to-bottom", label: "至底", icon: "download" },
{ name: "destroy-order", label: "废除", icon: "close" },
// { name: "move-up", label: "上移", icon: "arrow-up" },
// { name: "move-down", label: "下移", icon: "arrow-down" },
// { name: "move-to-top", label: "至顶", icon: "upload2" },
// { name: "move-to-bottom", label: "至底", icon: "download" },
// { name: "destroy-order", label: "废除", icon: "close" },
],
pending: [
{ name: "edit", label: "编辑", icon: "edit-outline" },
{ name: "view", label: "查看详情", icon: "view" },
{ name: "confirm-order", label: "确认订单", icon: "success" },
{ name: "move-up", label: "上移", icon: "arrow-up" },
{ name: "move-down", label: "下移", icon: "arrow-down" },
{ name: "move-to-top", label: "至顶", icon: "upload2" }, // , showText: true },
{ name: "move-to-bottom", label: "至底", icon: "download" }, // , showText: true },
// { name: "move-up", label: "上移", icon: "arrow-up" },
// { name: "move-down", label: "下移", icon: "arrow-down" },
// { name: "move-to-top", label: "至顶", icon: "upload2" }, // , showText: true },
// { name: "move-to-bottom", label: "至底", icon: "download" }, // , showText: true },
{ name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "" },
],
finished: [
@ -98,7 +98,7 @@ export default function () {
fixed: "right",
subcomponent: TableOperaionComponent,
options: operations[type],
width: operations[type].length > 1 ? operations[type].length * 40 : 90,
width: operations[type].length > 2 ? operations[type].length * 40 : 90,
},
// type !== "finished"

@ -101,42 +101,42 @@ export default function () {
},
{
input: true,
label: "物料编码/砖型编码",
label: "物料编码",
prop: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入设备编码" },
},
// { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } },
{
select: true,
label: "物料类型",
prop: "typeDictValue",
options:
"product_type" in dictList
? dictList["product_type"].map((item) => ({ value: item.dictValue, label: item.dictLabel }))
: [],
elparams: { placeholder: "选择一个物料类型" },
},
// {
// select: true,
// label: "物料类型",
// prop: "typeDictValue",
// options:
// "product_type" in dictList
// ? dictList["product_type"].map((item) => ({ value: item.dictValue, label: item.dictLabel }))
// : [],
// elparams: { placeholder: "选择一个物料类型" },
// },
],
[
// { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } },
{
select: true,
label: "单位",
prop: "unitDictValue",
options:
"unit" in dictList
? dictList["unit"].map((item) => ({ value: item.dictValue, label: item.dictLabel }))
: [],
elparams: { placeholder: "选择单位" },
},
{
input: true,
label: "规格",
prop: "specifications",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入规格" },
},
// {
// select: true,
// label: "单位",
// prop: "unitDictValue",
// options:
// "unit" in dictList
// ? dictList["unit"].map((item) => ({ value: item.dictValue, label: item.dictLabel }))
// : [],
// elparams: { placeholder: "选择单位" },
// },
// {
// input: true,
// label: "规格",
// prop: "specifications",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
// elparams: { placeholder: "请输入规格" },
// },
{
input: true,
label: "产线完成单位产品用时",
@ -147,8 +147,6 @@ export default function () {
],
elparams: { placeholder: "请输入规格" },
},
],
[
{
input: true,
label: "重量",
@ -159,7 +157,6 @@ export default function () {
],
elparams: { placeholder: "请输入重量" },
},
],
[{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
],