bugfix 0720 bomTechAndFiring
This commit is contained in:
parent
ab24d8b558
commit
be39723748
@ -22,8 +22,13 @@
|
|||||||
<el-form ref="dataForm" :model="dataForm" v-loading="loading">
|
<el-form ref="dataForm" :model="dataForm" v-loading="loading">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item label="bom" prop="bomId" :rules="rules.bom">
|
<el-form-item label="配方号" prop="code" :rules="rules.code">
|
||||||
<el-input v-model="dataForm.bomId" clearable disabled></el-input>
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
@ -43,7 +48,7 @@
|
|||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<!-- <el-button @click="handleBtnClick('保存')">保存</el-button> -->
|
<!-- <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>
|
<el-button @click="handleBtnClick('取消')">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -60,14 +65,17 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: null,
|
id: null,
|
||||||
bomId: null,
|
code: null,
|
||||||
techId: null,
|
name: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
bom: [],
|
code: [],
|
||||||
tech: [{ required: true, message: "必填项不能为空", trigger: "blur" }],
|
name: [],
|
||||||
|
tech: []
|
||||||
|
// name: [{ required: true, message: "必填项不能为空", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
techList: [],
|
techList: [],
|
||||||
|
btnLoading: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
@ -78,10 +86,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化
|
// 初始化
|
||||||
init({ id, bomId, techId }) {
|
init({ id, code, name, techId, bomId }) {
|
||||||
this.$set(this.dataForm, "id", id);
|
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, "techId", techId);
|
||||||
|
this.$set(this.dataForm, "bomId", bomId);
|
||||||
},
|
},
|
||||||
// 获取工艺列表
|
// 获取工艺列表
|
||||||
async getTechList() {
|
async getTechList() {
|
||||||
@ -103,13 +113,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 提交更新
|
|
||||||
async push(type = "add") {
|
|
||||||
if (type == "add") {
|
|
||||||
} else if (type == "update") {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 按钮事件
|
// 按钮事件
|
||||||
handleBtnClick(type) {
|
handleBtnClick(type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -123,14 +126,22 @@ export default {
|
|||||||
case "更新":
|
case "更新":
|
||||||
this.$refs.dataForm.validate((valid) => {
|
this.$refs.dataForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http.put("/pms/bomTech", this.dataForm).then((res) => {
|
this.btnLoading = true;
|
||||||
if (res.data.code == 0) {
|
this.$http
|
||||||
this.$message.success("更新成功");
|
.put("/pms/bomTech", {
|
||||||
this.handleClose(true);
|
id: this.dataForm.id,
|
||||||
} else {
|
techId: this.dataForm.techId,
|
||||||
this.$message.error(res.data.msg);
|
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;
|
break;
|
||||||
|
@ -201,9 +201,11 @@ export default {
|
|||||||
this.editVisible = true;
|
this.editVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.edit.init({
|
this.$refs.edit.init({
|
||||||
id: data.bomTechId,
|
id: data.bomTechId, // 只提交,不展示
|
||||||
bomId: data.id,
|
code: data.code, // 不提交,只展示
|
||||||
techId: data.techId,
|
name: data.name, // 不提交,只展示
|
||||||
|
techId: data.techId, // 及提交,也展示
|
||||||
|
bomId: data.id // 只提交,不展示
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
@ -11,7 +11,7 @@ export default function () {
|
|||||||
{ prop: "code", label: "料仓编码" },
|
{ prop: "code", label: "料仓编码" },
|
||||||
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') },
|
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') },
|
||||||
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
|
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
|
||||||
{ prop: "material", label: "原料" },
|
{ prop: "materialDescription", label: "原料" },
|
||||||
{ prop: "qty", label: "料位" },
|
{ prop: "qty", label: "料位" },
|
||||||
// { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') },
|
// { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') },
|
||||||
{ prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter('material_category') },
|
{ prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter('material_category') },
|
||||||
|
@ -26,20 +26,20 @@ export default function () {
|
|||||||
// { name: 'confirm-order', label: '确认', icon: 'success', showText: true },
|
// { name: 'confirm-order', label: '确认', icon: 'success', showText: true },
|
||||||
{ name: "view-ongoing", label: "查看详情", icon: "view", emitFull: true },
|
{ name: "view-ongoing", label: "查看详情", icon: "view", emitFull: true },
|
||||||
{ name: "end-order", label: "结束", icon: "finished" },
|
{ name: "end-order", label: "结束", icon: "finished" },
|
||||||
{ name: "move-up", label: "上移", icon: "arrow-up" },
|
// { name: "move-up", label: "上移", icon: "arrow-up" },
|
||||||
{ name: "move-down", label: "下移", icon: "arrow-down" },
|
// { name: "move-down", label: "下移", icon: "arrow-down" },
|
||||||
{ name: "move-to-top", label: "至顶", icon: "upload2" },
|
// { name: "move-to-top", label: "至顶", icon: "upload2" },
|
||||||
{ name: "move-to-bottom", label: "至底", icon: "download" },
|
// { name: "move-to-bottom", label: "至底", icon: "download" },
|
||||||
{ name: "destroy-order", label: "废除", icon: "close" },
|
// { name: "destroy-order", label: "废除", icon: "close" },
|
||||||
],
|
],
|
||||||
pending: [
|
pending: [
|
||||||
{ name: "edit", label: "编辑", icon: "edit-outline" },
|
{ name: "edit", label: "编辑", icon: "edit-outline" },
|
||||||
{ name: "view", label: "查看详情", icon: "view" },
|
{ name: "view", label: "查看详情", icon: "view" },
|
||||||
{ name: "confirm-order", label: "确认订单", icon: "success" },
|
{ name: "confirm-order", label: "确认订单", icon: "success" },
|
||||||
{ name: "move-up", label: "上移", icon: "arrow-up" },
|
// { name: "move-up", label: "上移", icon: "arrow-up" },
|
||||||
{ name: "move-down", label: "下移", icon: "arrow-down" },
|
// { name: "move-down", label: "下移", icon: "arrow-down" },
|
||||||
{ name: "move-to-top", label: "至顶", icon: "upload2" }, // , showText: true },
|
// { name: "move-to-top", label: "至顶", icon: "upload2" }, // , showText: true },
|
||||||
{ name: "move-to-bottom", label: "至底", icon: "download" }, // , showText: true },
|
// { name: "move-to-bottom", label: "至底", icon: "download" }, // , showText: true },
|
||||||
{ name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "" },
|
{ name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "" },
|
||||||
],
|
],
|
||||||
finished: [
|
finished: [
|
||||||
@ -98,7 +98,7 @@ export default function () {
|
|||||||
fixed: "right",
|
fixed: "right",
|
||||||
subcomponent: TableOperaionComponent,
|
subcomponent: TableOperaionComponent,
|
||||||
options: operations[type],
|
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"
|
// type !== "finished"
|
||||||
|
@ -101,42 +101,42 @@ export default function () {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
label: "物料编码/砖型编码",
|
label: "物料编码",
|
||||||
prop: "code",
|
prop: "code",
|
||||||
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||||
elparams: { placeholder: "请输入设备编码" },
|
elparams: { placeholder: "请输入设备编码" },
|
||||||
},
|
},
|
||||||
// { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } },
|
// { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } },
|
||||||
{
|
// {
|
||||||
select: true,
|
// select: true,
|
||||||
label: "物料类型",
|
// label: "物料类型",
|
||||||
prop: "typeDictValue",
|
// prop: "typeDictValue",
|
||||||
options:
|
// options:
|
||||||
"product_type" in dictList
|
// "product_type" in dictList
|
||||||
? dictList["product_type"].map((item) => ({ value: item.dictValue, label: item.dictLabel }))
|
// ? dictList["product_type"].map((item) => ({ value: item.dictValue, label: item.dictLabel }))
|
||||||
: [],
|
// : [],
|
||||||
elparams: { placeholder: "选择一个物料类型" },
|
// elparams: { placeholder: "选择一个物料类型" },
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
// { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } },
|
// { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } },
|
||||||
{
|
// {
|
||||||
select: true,
|
// select: true,
|
||||||
label: "单位",
|
// label: "单位",
|
||||||
prop: "unitDictValue",
|
// prop: "unitDictValue",
|
||||||
options:
|
// options:
|
||||||
"unit" in dictList
|
// "unit" in dictList
|
||||||
? dictList["unit"].map((item) => ({ value: item.dictValue, label: item.dictLabel }))
|
// ? dictList["unit"].map((item) => ({ value: item.dictValue, label: item.dictLabel }))
|
||||||
: [],
|
// : [],
|
||||||
elparams: { placeholder: "选择单位" },
|
// elparams: { placeholder: "选择单位" },
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
input: true,
|
// input: true,
|
||||||
label: "规格",
|
// label: "规格",
|
||||||
prop: "specifications",
|
// prop: "specifications",
|
||||||
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||||
elparams: { placeholder: "请输入规格" },
|
// elparams: { placeholder: "请输入规格" },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
label: "产线完成单位产品用时",
|
label: "产线完成单位产品用时",
|
||||||
@ -147,8 +147,6 @@ export default function () {
|
|||||||
],
|
],
|
||||||
elparams: { placeholder: "请输入规格" },
|
elparams: { placeholder: "请输入规格" },
|
||||||
},
|
},
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
label: "重量",
|
label: "重量",
|
||||||
@ -159,7 +157,6 @@ export default function () {
|
|||||||
],
|
],
|
||||||
elparams: { placeholder: "请输入重量" },
|
elparams: { placeholder: "请输入重量" },
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
[{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
|
[{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user