Commit 132415c8 by duxingshan

1、领用台账修改领用人返回的数据类型

2、产品分类-判断当前是否添加一级分类,更新分类列表
parent 6d04da99
......@@ -211,7 +211,6 @@ export default {
handleAdd(row) {
this.reset();
this.open = true;
this.getList();
if (row != null && row.id) {
console.log('row', row);
this.postForm.parentId = row.id;
......@@ -219,7 +218,6 @@ export default {
this.postForm.parentId = undefined;
}
this.title = "新增";
},
/** 转换数据结构 */
normalizer(node) {
......@@ -286,15 +284,12 @@ export default {
});
} else {
addProduct(this.postForm).then(response => {
console.log('this.postForm', this.postForm);
// if (this.postForm.parentId === 0) {
// console.log(1111, this.postForm.parentId);
// }
if (this.postForm.parentId == undefined) {
this.enuqLeader();
}
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.enuqLeader();
});
}
......
......@@ -70,8 +70,9 @@
<el-col :span="12">
<el-form-item label="领用人" prop="recipientById">
<el-select v-model="collectionForm.recipientById" filterable placeholder="请选择领用人" clearable
style="width: 100%;" :disabled="nowType == 2 ? true : false">
<el-option v-for="(item, index) in userListly" :key="index" :label="item.userName" :value="item.userId">
class="selectWidth" :disabled="nowType == 2 ? true : false">
<el-option v-for="(item, index) in userListly" :key="index"
:label="item.userName" :value="item.userId">
</el-option>
</el-select>
</el-form-item>
......@@ -190,8 +191,6 @@ export default {
yjuseTime: '',
sjuseTime: '',
remark: '',
},
dialogVisible: false,
nowType: 0, // 0新增、1编辑、2查看
......@@ -221,10 +220,7 @@ export default {
{ required: true, message: "实际使用时间不能为空", trigger: "blur" }
]
},
dialogVisible: false,
isEditable: true,
}
},
created() {
......@@ -270,12 +266,12 @@ export default {
const id = item.id;
queryReceive(id).then(res => {
if (res.code == 200) {
console.log(res.data);
Object.keys(this.collectionForm).forEach(key => {
if (res.data[key]) {
this.$set(this.collectionForm, key, res.data[key]);
}
});
this.collectionForm.recipientById = Number(this.collectionForm.recipientById)
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment