|
|
|
@ -147,6 +147,7 @@
|
|
|
|
|
<dict-tag :options="dict.type.mes_material_status" :value="scope.row.activeFlag"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="旧物料编码" align="center" prop="oldMaterialCode"/>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
@ -241,7 +242,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="状态" prop="activeFlag">
|
|
|
|
|
<el-radio-group v-model="form.activeFlag">
|
|
|
|
|
<el-radio-group v-model="form.activeFlag" :disabled="form.activeFlag !== '1'">
|
|
|
|
|
<el-radio
|
|
|
|
|
v-for="dict in dict.type.mes_material_status"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -257,6 +258,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
@ -279,7 +282,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Materialinfo",
|
|
|
|
|
dicts: ['active_flag', 'material_categories', 'mes_material_bind_flag','mes_material_batch_flag','mes_material_status'],
|
|
|
|
|
dicts: ['active_flag', 'material_categories', 'mes_material_bind_flag', 'mes_material_batch_flag', 'mes_material_status'],
|
|
|
|
|
components: {
|
|
|
|
|
Treeselect
|
|
|
|
|
},
|
|
|
|
@ -349,6 +352,7 @@ export default {
|
|
|
|
|
// {required: true, message: "物料类型不能为空", trigger: "blur"}
|
|
|
|
|
// ],
|
|
|
|
|
},
|
|
|
|
|
currentStatus: '',
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
@ -437,6 +441,7 @@ export default {
|
|
|
|
|
const materialId = row.materialId || this.ids
|
|
|
|
|
getMaterialinfo(materialId).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.currentStatus = this.form.activeFlag;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改物料信息";
|
|
|
|
|
});
|
|
|
|
@ -446,11 +451,25 @@ export default {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.materialId != null) {
|
|
|
|
|
updateMaterialinfo(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
let thisForm = this.form;
|
|
|
|
|
if (this.form.activeFlag !== this.currentStatus) {
|
|
|
|
|
this.$modal.confirm('确认要修改物料信息的状态么?').then(function () {
|
|
|
|
|
return updateMaterialinfo(thisForm);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
updateMaterialinfo(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
addMaterialinfo(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
@ -494,7 +513,9 @@ export default {
|
|
|
|
|
this.download('mes/materialinfo/export', {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `materialinfo_${new Date().getTime()}.xlsx`)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|