|
|
@@ -36,19 +36,29 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-left: 50px">
|
|
|
- <el-button v-no-more-click
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
type="primary"
|
|
|
icon="el-icon-search"
|
|
|
size="mini"
|
|
|
@click="handleQuery"
|
|
|
>搜索</el-button
|
|
|
>
|
|
|
- <el-button v-no-more-click icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ size="mini"
|
|
|
+ @click="resetQuery"
|
|
|
>重置</el-button
|
|
|
>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-button v-no-more-click size="mini" type="primary" icon="el-icon-plus" @click="handleAdd"
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="handleAdd"
|
|
|
>新增</el-button
|
|
|
>
|
|
|
<el-table
|
|
|
@@ -108,7 +118,8 @@
|
|
|
class-name="small-padding fixed-width"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-no-more-click
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@@ -116,14 +127,16 @@
|
|
|
v-hasPermi="['mes:mat:type:edit']"
|
|
|
>编辑</el-button
|
|
|
>
|
|
|
- <el-button v-no-more-click
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-plus"
|
|
|
@click="handleAdd(scope.row)"
|
|
|
>新增</el-button
|
|
|
>
|
|
|
- <el-button v-no-more-click
|
|
|
+ <el-button
|
|
|
+ v-no-more-click
|
|
|
v-if="scope.row.parentId != 0"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@@ -268,7 +281,9 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button v-no-more-click type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button v-no-more-click type="primary" @click="submitForm"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
<el-button v-no-more-click @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
@@ -472,7 +487,7 @@ export default {
|
|
|
this.form.parentId = row.materialsTypeId;
|
|
|
this.form.ancestors = row.ancestors + "," + row.materialsTypeId;
|
|
|
} else {
|
|
|
- this.form.parentId = 0;
|
|
|
+ this.form.parentId = null;
|
|
|
this.form.ancestors = 0;
|
|
|
}
|
|
|
this.form.restitutionRequired = 1;
|
|
|
@@ -488,8 +503,12 @@ export default {
|
|
|
if (row != null) {
|
|
|
this.form.parentId = row.materialsTypeId;
|
|
|
}
|
|
|
+
|
|
|
selectMaterialsTypeById(row.materialsTypeId).then((response) => {
|
|
|
this.form = response.data;
|
|
|
+ if (this.form.parentId == 0) {
|
|
|
+ this.form.parentId = null;
|
|
|
+ }
|
|
|
console.log(response.data.reminderTime, "修改");
|
|
|
|
|
|
const convertTime = (time) => ({
|
|
|
@@ -545,6 +564,9 @@ export default {
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
+ if (this.form.parentId == null) {
|
|
|
+ this.form.parentId = 0;
|
|
|
+ }
|
|
|
addMaterialsType(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|