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