分类第三方产品信息问题

dev
anthonywj 2 years ago
parent 8a7b3bd549
commit f8a186618a

@ -19,9 +19,10 @@
<el-button
type="text"
size="mini"
style="margin-left: 10px"
@click="() => append(data,'add')">
新增
</el-button>
新增
</el-button>
<el-button
type="text"
size="mini"
@ -331,7 +332,7 @@
v-model="subData.parentCode"
:options="fromDeptOptions"
:normalizer="normalizer"
:clearable = "false"
:clearable="false"
:show-count="true"
placeholder="选择上级菜单"
/>
@ -1331,7 +1332,6 @@
</el-dialog>
</el-card>
</div>
</template>
@ -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;
}

@ -64,19 +64,22 @@
<el-row>
<el-col :span="6">
<el-form-item label="类别编码:" class="query-form-item">
<el-input v-model="listQuery.category" style="width: 100%" placeholder="请输入类别编码" clearable="true"></el-input>
<el-form-item label="物资分类:" class="query-form-item">
<el-input v-model="listQuery.category" style="width: 100%" placeholder="请输入物资分类名称"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6" v-if="productRemarkSet.remarkEnable1">
<el-form-item :label="productRemarkSet.remarkTitle1+':'" class="query-form-item">
<el-input v-model="listQuery.basicPrductRemak1" style="width: 100%" :placeholder="productRemarkSet.remarkTitle1"
<el-input v-model="listQuery.basicPrductRemak1" style="width: 100%"
:placeholder="productRemarkSet.remarkTitle1"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6" v-if="productRemarkSet.remarkEnable2">
<el-form-item :label="productRemarkSet.remarkTitle2 +':'" class="query-form-item">
<el-input v-model="listQuery.basicPrductRemak2" style="width: 100%" :placeholder="productRemarkSet.remarkTitle2"
<el-input v-model="listQuery.basicPrductRemak2" style="width: 100%"
:placeholder="productRemarkSet.remarkTitle2"
clearable="true"></el-input>
</el-form-item>
</el-col>

Loading…
Cancel
Save