diff --git a/src/views/basic/product/productCategory.vue b/src/views/basic/product/productCategory.vue index a7396e1e..653833b3 100644 --- a/src/views/basic/product/productCategory.vue +++ b/src/views/basic/product/productCategory.vue @@ -19,9 +19,10 @@ - 新增 - + 新增 + @@ -1331,7 +1332,6 @@ - @@ -1364,26 +1364,26 @@ export default { checked: false, sysList: [], productRemarkSet: {}, - inputQuery:{}, - editDialogVisible:false, + inputQuery: {}, + editDialogVisible: false, loading: false, - total:0, - list:[], + total: 0, + list: [], selectHospProductVisible: false, - rId:null, + rId: null, subFormVisible: false, formMap: { add: "新增", edit: "编辑" }, - fromDeptOptions:[], + fromDeptOptions: [], subData: {}, - formName:null, + formName: null, showSearch: true, treeList: [], - Dictionary: false, //物资字典分类显示、隐藏 + Dictionary: true, //物资字典分类显示、隐藏 filterQuery: { - code:"", + code: "", parentCode: "", unionCode: null, udiCode: null, @@ -1447,7 +1447,7 @@ export default { }, - diEdit(row){ + diEdit(row) { this.uuid = row.uuid; this.relId = row.id; this.isImport = false; @@ -1488,27 +1488,27 @@ export default { this.sysList = []; }); }, - deleteDialog(row){ - this.$confirm('确认删除吗?','提示',{ + deleteDialog(row) { + this.$confirm('确认删除吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }) - .then(()=>{ - let param={ - id:row.bpcrid + .then(() => { + let param = { + id: row.bpcrid } deleterel(param) .then((res) => { - if(res.code == 20000){ + if (res.code == 20000) { this.$message.success("删除成功!"); - }else{ + } else { this.$message.error(res.message); } - this.getList(); + this.getList(); }) }) - .catch(()=>{ + .catch(() => { }) @@ -1516,22 +1516,21 @@ export default { }, - - closeCategory(){ - this.selectHospProductVisible=false; + closeCategory() { + this.selectHospProductVisible = false; this.getList(); }, - handleCurrentChange(val){ - this.filterQuery.page=val.page; + handleCurrentChange(val) { + this.filterQuery.page = val.page; this.getList(); }, - handleForm(){ - if(this.rId == null || this.rId == 10000){ + handleForm() { + if (this.rId == null || this.rId == 10000) { this.$message("请选择分类!"); this.selectHospProductVisible = false; - }else{ + } else { this.selectHospProductVisible = true; } @@ -1545,22 +1544,22 @@ export default { } else { this.filterQuery.code = null; } - this.filterQuery.page=1; + this.filterQuery.page = 1; this.getList(); }, - remove(node, data){ + remove(node, data) { debugger - if(data.id){ - this.$confirm("确认删除该节点吗?", "提示",{ - type:"warning", + if (data.id) { + this.$confirm("确认删除该节点吗?", "提示", { + type: "warning", }) - .then(()=>{ + .then(() => { this.deleteLoading = true; - let param={id:data.id,code:data.code }; + let param = {id: data.id, code: data.code}; deleteBasicHospType(param) - .then((response) =>{ + .then((response) => { this.deleteLoading = false; if (response.code !== 20000) { this.$message.error(response.message); @@ -1569,29 +1568,28 @@ export default { this.getTerrList(); this.$message.success("删除成功"); }) - .catch(()=>{ + .catch(() => { this.deleteLoading = false; }) }) - .catch(()=>{ + .catch(() => { this.$message.info("取消删除"); }) } }, - - forInvSubmit(){ // 新增 编辑 提交 - if(this.subData.code!=10000 && this.subData.parentCode==null){ + forInvSubmit() { // 新增 编辑 提交 + if (this.subData.code != 10000 && this.subData.parentCode == null) { this.$message.error("上级菜单不能为空"); return } - if(this.subData.name==null){ + if (this.subData.name == null) { this.$message.error("名称不能为空!"); return } - if(this.subData.id!=null){ + if (this.subData.id != null) { uodateBasicHospType(this.subData).then((response) => { if (response.code == 20000) { this.subFormVisible = false; @@ -1602,7 +1600,7 @@ export default { }).catch(() => { this.subFormVisible = false; }); - }else{ + } else { saveBasicHospType(this.subData).then((response) => { if (response.code == 20000) { this.subFormVisible = false; @@ -1616,12 +1614,10 @@ export default { } - }, - - hideForm(){ + hideForm() { this.formVisible = false; this.subFormVisible = false; this.resetForm(); @@ -1638,14 +1634,14 @@ export default { } }, - append(data,formName){//新增 编辑 + append(data, formName) {//新增 编辑 this.formName = formName; if (formName === "edit") { this.subData = JSON.parse(JSON.stringify(data)); - this.subData.name= JSON.parse(JSON.stringify(data.label)); - }else if(formName === "add"){ - this.subData= { - parentCode:JSON.parse(JSON.stringify(data)).code + this.subData.name = JSON.parse(JSON.stringify(data.label)); + } else if (formName === "add") { + this.subData = { + parentCode: JSON.parse(JSON.stringify(data)).code }; } this.getTreeselect(data); @@ -1654,17 +1650,17 @@ export default { /** 查询菜单下拉树结构 */ getTreeselect(row) { - if(row!=null){ - var data={ - code:row.code, - type:1 + if (row != null) { + var data = { + code: row.code, + type: 1 } } - getOneName().then(res =>{ - const menu = {id: res.data.id,code:res.data.code, name: res.data.name, children: []}; + getOneName().then(res => { + const menu = {id: res.data.id, code: res.data.code, name: res.data.name, children: []}; getListMenu(data).then(response => { this.fromDeptOptions = []; - menu.children = this.handleTree(response.data,"code", "parentCode"); + menu.children = this.handleTree(response.data, "code", "parentCode"); console.log(menu) this.fromDeptOptions.push(menu); console.log(this.fromDeptOptions) @@ -1729,7 +1725,7 @@ export default { mounted() { }, components: { - Treeselect,selectProduct, + Treeselect, selectProduct, }, created() { this.getList(); @@ -1751,6 +1747,7 @@ export default { height: 100%; align-items: start; } + .el-tree-node:focus > .el-tree-node__content { background-color: rgb(158, 213, 250) !important; } diff --git a/src/views/purchase/purApply/purOrderSelectProduct.vue b/src/views/purchase/purApply/purOrderSelectProduct.vue index a19f372c..3cdb0a9b 100644 --- a/src/views/purchase/purApply/purOrderSelectProduct.vue +++ b/src/views/purchase/purApply/purOrderSelectProduct.vue @@ -64,19 +64,22 @@ - - + + - -