物质分类代码提交

ywj_dev
郑明梁 2 years ago
parent bf1a61a241
commit 6247b8d7cb

@ -13,12 +13,21 @@ export function getBasicHospType(query) {
export function getListMenu(query) {
return axios({
url: "/udiwms/basic/hosp/type/menuList",
method: "post",
data: query
});
}
export function getOneName(query) {
return axios({
url: "/udiwms/basic/hosp/type/getOneName",
method: "get",
params: query
});
}
export function saveBasicHospType(query) {
return axios({
url: "/udiwms/basic/hosp/type/save",

@ -578,7 +578,7 @@ import ProductSingleEdit from "@/views/basic/product/productSingleEdit";
import selectErp from "./udiInfoselectErpUdi";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Treeselect from "@riophae/vue-treeselect";
import {getListMenu} from "@/api/basic/basicHospType";
import { getListMenu, getOneName } from '@/api/basic/basicHospType'
export default {
@ -849,12 +849,15 @@ export default {
}
},
getTreeselect() {
getListMenu().then(response => {
getOneName().then(res =>{
const menu = {id: res.data.id,code:res.data.code, name: res.data.name, children: []};
getListMenu({}).then(response => {
this.fromDeptOptions = [];
const menu = {id: 0, name: '主类目', children: []};
menu.children = this.handleTree(response.data,"code", "parentCode");
console.log(menu)
this.fromDeptOptions.push(menu);
});
})
},
/** 转换菜单数据结构 */
normalizer(node) {

@ -32,7 +32,7 @@
<el-table-column label="操作" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="text" @click="handleSubForm( scope.row, 'add')">新增</el-button>
<el-button type="text" v-if="scope.row.code!=10000" @click.native.stop="handleSubForm( scope.row, 'edit')"></el-button>
<el-button type="text" @click.native.stop="handleSubForm( scope.row, 'edit')">编辑</el-button>
<el-button type="text" v-if="scope.row.code!=10000" @click.native.stop="handleDelInv(scope.row)"></el-button>
<el-button type="text" v-if="scope.row.code!=10000" @click.native.stop="addHospProduct( scope.row)"></el-button>
<el-button type="text" v-if="scope.row.code!=10000" @click.native.stop="removeHospProduct(scope.row)"></el-button>
@ -54,10 +54,11 @@
<el-col :span="12" class="el-col">
<el-form-item label="上级菜单" prop="parentCode">
<treeselect
:disabled="formName=='add'"
:disabled="formName=='add' || subData.code==10000"
v-model="subData.parentCode"
:options="fromDeptOptions"
:normalizer="normalizer"
:clearable = "false"
:show-count="true"
placeholder="选择上级菜单"
/>
@ -133,7 +134,7 @@
<script>
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Treeselect from "@riophae/vue-treeselect";
import {getBasicHospType, getListMenu, saveBasicHospType,uodateBasicHospType,deleteBasicHospType} from "@/api/basic/basicHospType";
import {getBasicHospType, getListMenu, saveBasicHospType,uodateBasicHospType,deleteBasicHospType,getOneName} from "@/api/basic/basicHospType";
import selectHospProduct from "@/views/basic/product/bindHospProduct";
import selectUnBindHospProduct from "@/views/basic/product/unbindHospProduct";
@ -226,7 +227,7 @@ export default {
parentCode:JSON.parse(JSON.stringify(data)).code
};
}
this.getTreeselect();
this.getTreeselect(data);
this.subFormVisible = true;
},
@ -248,7 +249,7 @@ export default {
},
forInvSubmit() { // ---
if(this.subData.parentCode==null){
if(this.subData.code!=10000 && this.subData.parentCode==null){
this.$message.error("上级菜单不能为空");
return
}
@ -282,13 +283,23 @@ export default {
},
/** 查询菜单下拉树结构 */
getTreeselect() {
getListMenu().then(response => {
getTreeselect(row) {
debugger
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: []};
getListMenu(data).then(response => {
this.fromDeptOptions = [];
const menu = {id: 0, name: '主类目', children: []};
menu.children = this.handleTree(response.data,"code", "parentCode");
console.log(menu)
this.fromDeptOptions.push(menu);
});
})
},
/** 转换菜单数据结构 */
normalizer(node) {

@ -78,6 +78,7 @@ import {formatDate} from "../../../utils/date";
export default {
data() {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true,
filterQuery: {
genKey: null,
@ -158,8 +159,8 @@ export default {
this.thrProductsSelectVisible = true;
},
downloadExcel(row) {
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
debugger
let baseUrl = this.BASE_URL;
let href = baseUrl + "/udiwms/thrProducts/exportLog/download" + "?genKey=" + row.genKey;
let a = document.createElement("a");
var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
@ -173,8 +174,6 @@ export default {
a.click();
this.getList();
});
});
},
cancelDialog(val) {

Loading…
Cancel
Save