Commit 132415c8 by duxingshan

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

2、产品分类-判断当前是否添加一级分类,更新分类列表
parent 6d04da99
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<el-button @click="cancel"> 取 消 </el-button> <el-button @click="cancel"> 取 消 </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
}, },
//管理员 //管理员
adminUser: [], adminUser: [],
} }
}, },
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
this.loading = false; this.loading = false;
}) })
}, },
// 展开/折叠 // 展开/折叠
toggleExpandAll() { toggleExpandAll() {
...@@ -211,7 +211,6 @@ export default { ...@@ -211,7 +211,6 @@ export default {
handleAdd(row) { handleAdd(row) {
this.reset(); this.reset();
this.open = true; this.open = true;
this.getList();
if (row != null && row.id) { if (row != null && row.id) {
console.log('row', row); console.log('row', row);
this.postForm.parentId = row.id; this.postForm.parentId = row.id;
...@@ -219,7 +218,6 @@ export default { ...@@ -219,7 +218,6 @@ export default {
this.postForm.parentId = undefined; this.postForm.parentId = undefined;
} }
this.title = "新增"; this.title = "新增";
}, },
/** 转换数据结构 */ /** 转换数据结构 */
normalizer(node) { normalizer(node) {
...@@ -285,18 +283,15 @@ export default { ...@@ -285,18 +283,15 @@ export default {
}); });
} else { } else {
addProduct(this.postForm).then(response => { addProduct(this.postForm).then(response => {
console.log('this.postForm', this.postForm); if (this.postForm.parentId == undefined) {
// if (this.postForm.parentId === 0) {
// console.log(1111, this.postForm.parentId);
// }
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.enuqLeader(); this.enuqLeader();
}
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}); });
} }
} }
}); });
......
...@@ -70,8 +70,9 @@ ...@@ -70,8 +70,9 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="领用人" prop="recipientById"> <el-form-item label="领用人" prop="recipientById">
<el-select v-model="collectionForm.recipientById" filterable placeholder="请选择领用人" clearable <el-select v-model="collectionForm.recipientById" filterable placeholder="请选择领用人" clearable
style="width: 100%;" :disabled="nowType == 2 ? true : false"> 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 v-for="(item, index) in userListly" :key="index"
:label="item.userName" :value="item.userId">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -190,8 +191,6 @@ export default { ...@@ -190,8 +191,6 @@ export default {
yjuseTime: '', yjuseTime: '',
sjuseTime: '', sjuseTime: '',
remark: '', remark: '',
}, },
dialogVisible: false, dialogVisible: false,
nowType: 0, // 0新增、1编辑、2查看 nowType: 0, // 0新增、1编辑、2查看
...@@ -221,10 +220,7 @@ export default { ...@@ -221,10 +220,7 @@ export default {
{ required: true, message: "实际使用时间不能为空", trigger: "blur" } { required: true, message: "实际使用时间不能为空", trigger: "blur" }
] ]
}, },
dialogVisible: false,
isEditable: true, isEditable: true,
} }
}, },
created() { created() {
...@@ -270,12 +266,12 @@ export default { ...@@ -270,12 +266,12 @@ export default {
const id = item.id; const id = item.id;
queryReceive(id).then(res => { queryReceive(id).then(res => {
if (res.code == 200) { if (res.code == 200) {
console.log(res.data);
Object.keys(this.collectionForm).forEach(key => { Object.keys(this.collectionForm).forEach(key => {
if (res.data[key]) { if (res.data[key]) {
this.$set(this.collectionForm, key, res.data[key]); this.$set(this.collectionForm, key, res.data[key]);
} }
}); });
this.collectionForm.recipientById = Number(this.collectionForm.recipientById)
} }
}) })
...@@ -384,7 +380,7 @@ export default { ...@@ -384,7 +380,7 @@ export default {
this.getList(); this.getList();
}); });
} }
} else if (this.nowType == 0) { // 新增操作 } else if (this.nowType == 0) { // 新增操作
addReceive(this.collectionForm).then(response => { addReceive(this.collectionForm).then(response => {
console.log('this.collectionForm', this.collectionForm) console.log('this.collectionForm', this.collectionForm)
console.log(response) console.log(response)
......
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