|
|
|
@ -48,9 +48,6 @@
|
|
|
|
|
<el-button type="primary" icon="search" @click="exportInvwarehouse"
|
|
|
|
|
:disabled="!configParms.basicInv">导出
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<!-- <el-button type="primary" icon="search" @click="uploadInvwarehouse">同步至UDI管理系统</el-button>-->
|
|
|
|
|
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
@ -59,11 +56,13 @@
|
|
|
|
|
style="width: 100%;margin-bottom: 20px;"
|
|
|
|
|
row-key="id"
|
|
|
|
|
border
|
|
|
|
|
default-expand-all
|
|
|
|
|
highlight-current-row
|
|
|
|
|
@row-click="loadLinkData"
|
|
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
|
|
|
|
|
|
|
|
|
@current-change="handInvCurrentChange">
|
|
|
|
|
<el-table-column label width="45">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="code"
|
|
|
|
|
label="仓库编码"
|
|
|
|
@ -96,29 +95,22 @@
|
|
|
|
|
label="上级仓库"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="isDefault"-->
|
|
|
|
|
<!-- label="是否默认库存">-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- <span>{{ enableMap[scope.row.isDefault] }}</span>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" fixed="right">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="text"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- :disabled="scope.row.pid!=0"-->
|
|
|
|
|
<!-- @click.native.stop="handleSubForm(node, scope.row, 'add')"-->
|
|
|
|
|
<!-- >添加货位-->
|
|
|
|
|
<!-- </el-button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="handleForm(node, scope.row, 'edit')"
|
|
|
|
|
:disabled="scope.row.pid!=0"
|
|
|
|
|
@click.native.stop="handleSubForm(scope.row, 'add')"
|
|
|
|
|
>添加分库
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="handleForm( scope.row, 'edit')"
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
@ -134,17 +126,82 @@
|
|
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
:data="subList"
|
|
|
|
|
border
|
|
|
|
|
highlight-current-row
|
|
|
|
|
@current-change="handSubInvCurrentChange"
|
|
|
|
|
style="width: 100%;">
|
|
|
|
|
|
|
|
|
|
<el-table-column label width="45">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-radio :label="scope.row.id" v-model="subRadioCheck"><span></span></el-radio>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="code"
|
|
|
|
|
label="分库编码"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="name"
|
|
|
|
|
label="分库名称"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="name"
|
|
|
|
|
label="所属仓库"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" fixed="right">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="addUser(scope.row)"
|
|
|
|
|
>添加用户
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="addBussinessType(scope.row)"
|
|
|
|
|
>添加单据类型
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="handleSubForm( scope.row, 'edit')"
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="handleSubDel(scope.row)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<el-card style="width: 49%; float: left; margin-right: 0px;">
|
|
|
|
|
<div slot="header" class="clearfix" style="margin-bottom: 20px;">
|
|
|
|
|
<el-button style="float: right;" type="primary" @click="addUser()"
|
|
|
|
|
:disabled="currentRow.status == 0 || !configParms.basicInv">添加用户
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div slot="header" class="clearfix" style="margin-bottom: 20px;">-->
|
|
|
|
|
<!-- <el-button style="float: right;" type="primary" @click="addUser()"-->
|
|
|
|
|
<!-- :disabled="currentRow.status == 0 || !configParms.basicInv">添加用户-->
|
|
|
|
|
<!-- </el-button>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<el-table
|
|
|
|
|
:data="userData"
|
|
|
|
|
stripe
|
|
|
|
|
key="row.id"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
@ -189,14 +246,14 @@
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-card style="width: 49%; float: right; margin-left: 0px;">
|
|
|
|
|
<div slot="header" class="clearfix" style="margin-bottom: 20px;">
|
|
|
|
|
<el-button style="float: right;" @click="addBussinessType()" type="primary"
|
|
|
|
|
:disabled="currentRow.status == 0 || !configParms.basicInv">添加单据类型
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div slot="header" class="clearfix" style="margin-bottom: 20px;">-->
|
|
|
|
|
<!-- <el-button style="float: right;" @click="addBussinessType()" type="primary"-->
|
|
|
|
|
<!-- :disabled="currentRow.status == 0 || !configParms.basicInv">添加单据类型-->
|
|
|
|
|
<!-- </el-button>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<el-table
|
|
|
|
|
:data="bussinessTypeData"
|
|
|
|
|
stripe
|
|
|
|
|
key="row.id"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
@ -259,7 +316,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!--添加单据类型弹窗-->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="单据类型"
|
|
|
|
@ -292,7 +348,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!--表单界面-->
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="formMap[formName]"
|
|
|
|
@ -303,14 +358,14 @@
|
|
|
|
|
width="60%"
|
|
|
|
|
top="5vh"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="formData" :rules="formRules" ref="dataForm">
|
|
|
|
|
<el-form-item label="本企业仓库" prop="pid">
|
|
|
|
|
<el-select v-model="formData.pid" placeholder="顶级" disabled>
|
|
|
|
|
<el-form :model="subData" ref="dataForm">
|
|
|
|
|
<el-form-item label="所属仓库" prop="pid">
|
|
|
|
|
<el-select v-model="subData.parentId" placeholder="顶级" disabled>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in mergeList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
>
|
|
|
|
|
<span style="float: left"
|
|
|
|
|
><span v-html="item.html"></span>{{ item.name }}</span
|
|
|
|
@ -319,45 +374,34 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="货位编码" prop="title" class="query-form-item">
|
|
|
|
|
<el-form-item label="分库编码" prop="title" class="query-form-item">
|
|
|
|
|
<el-input
|
|
|
|
|
disabled
|
|
|
|
|
v-model="formData.code" style="width: 80%"
|
|
|
|
|
v-model="subData.code" style="width: 80%"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="货位名称" prop="name" class="query-form-item">
|
|
|
|
|
<el-form-item label="分库名称" prop="name" class="query-form-item">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="formData.name" style="width: 80%"
|
|
|
|
|
v-model="subData.name" style="width: 80%"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item class="query-form-item" label="仓库类型:">
|
|
|
|
|
<el-select v-model="formData.advanceType" placeholder="仓库类型" clearable disabled>
|
|
|
|
|
<el-option label="寄售" :value=true></el-option>
|
|
|
|
|
<el-option label="仓库" :value=false></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="状态:" prop="status" class="query-form-item">
|
|
|
|
|
<el-radio-group v-model="formData.status">
|
|
|
|
|
<el-radio :label="0">禁用</el-radio>
|
|
|
|
|
<el-radio :label="1">正常</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click.native="hideForm">取消</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click.native="formSubmit()"
|
|
|
|
|
@click.native="forSubSubmit()"
|
|
|
|
|
:loading="formLoading"
|
|
|
|
|
>提交
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 添加仓库弹窗-->
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="formMap[formName]"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
@ -479,23 +523,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item v-if="formData.pid == 0">-->
|
|
|
|
|
<!-- <el-row :gutter="20" class="el-row" type="flex">-->
|
|
|
|
|
<!-- <el-col :span="4" class="el-col">-->
|
|
|
|
|
<!-- <div class="text item">-->
|
|
|
|
|
<!-- <el-checkbox v-model="formData.advanceType">是否寄售仓库</el-checkbox>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="4" class="el-col">-->
|
|
|
|
|
<!-- <div class="text item">-->
|
|
|
|
|
<!-- <el-checkbox v-model="formData.isDefault">是否设为默认仓库</el-checkbox>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click.native="hideForm">取消</el-button>
|
|
|
|
@ -509,8 +536,6 @@
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="关联仓库" :visible.sync="thrWareHouseVisible">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -593,6 +618,11 @@ import {
|
|
|
|
|
deleteWarehouseUser, deleteWarehouseBussinessType,
|
|
|
|
|
bindThrWarehouse, unbindThrWarehouse, getThrsysDetail
|
|
|
|
|
} from "../../api/basic/invWarehouse";
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
filterSubAll, saveSubWarehouse, deleteSubWarehouse
|
|
|
|
|
} from "../../api/basic/invSubWarehouse";
|
|
|
|
|
|
|
|
|
|
import {filterThrList} from "@/api/thrsys/thrInvWarehouse";
|
|
|
|
|
import {getHospitalUserList} from "../../api/auth/authUser";
|
|
|
|
|
import {getJoinBussinessType} from "../../api/basic/bussinessType";
|
|
|
|
@ -614,6 +644,8 @@ const formJson = {
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
radioCheck: null,
|
|
|
|
|
subRadioCheck: null,
|
|
|
|
|
query: {
|
|
|
|
|
id: null,
|
|
|
|
|
pid: null,
|
|
|
|
@ -625,13 +657,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
headers: {},
|
|
|
|
|
mergeList: [],
|
|
|
|
|
subList: [],
|
|
|
|
|
node: null,
|
|
|
|
|
defaultProps: {
|
|
|
|
|
children: "children",
|
|
|
|
|
label: "name"
|
|
|
|
|
},
|
|
|
|
|
setDictor: "设为主管",
|
|
|
|
|
treeList: [],
|
|
|
|
|
fileList: [],
|
|
|
|
|
pCodes: [],
|
|
|
|
|
uploadData: {},
|
|
|
|
@ -694,45 +726,13 @@ export default {
|
|
|
|
|
limit: 10
|
|
|
|
|
, thirdSysFk: "thirdId",
|
|
|
|
|
},
|
|
|
|
|
configParms: {}
|
|
|
|
|
configParms: {},
|
|
|
|
|
subData: {},
|
|
|
|
|
subFromName: "add",
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/*eslint-disable */
|
|
|
|
|
renderContent(h, {node, data, store}) {
|
|
|
|
|
return (
|
|
|
|
|
<span
|
|
|
|
|
style="flex: 1; display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding-right: 8px;">
|
|
|
|
|
<span>
|
|
|
|
|
<span title={data.name} style="margin-left:8px">{node.label}</span>
|
|
|
|
|
<span style="margin-left:18px">(编码:{data.code})</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span>
|
|
|
|
|
<el-button
|
|
|
|
|
style="font-size: 12px;"
|
|
|
|
|
type="text"
|
|
|
|
|
on-click={() => this.handleSubForm(node, data, "add")}
|
|
|
|
|
>
|
|
|
|
|
添加货位
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
style="font-size: 12px;"
|
|
|
|
|
type="text"
|
|
|
|
|
on-click={() => this.handleForm(node, data, "edit")}
|
|
|
|
|
>
|
|
|
|
|
编辑
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
style="font-size: 12px;"
|
|
|
|
|
type="text"
|
|
|
|
|
on-click={() => this.handleDel(node, data)}
|
|
|
|
|
>
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
onReset() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: "",
|
|
|
|
@ -752,12 +752,10 @@ export default {
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.mergeList = response.data.list || [];
|
|
|
|
|
this.treeList = response.data.tree_list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.mergeList = [];
|
|
|
|
|
this.treeList = [];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 刷新表单
|
|
|
|
@ -824,21 +822,18 @@ export default {
|
|
|
|
|
this.sysList = [];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleSubForm(node, data, formName) {
|
|
|
|
|
this.subFormVisible = true;
|
|
|
|
|
this.pidData = data || null;
|
|
|
|
|
formJson.pid = (data && parseInt(data.id)) || "";
|
|
|
|
|
this.formData = JSON.parse(JSON.stringify(formJson));
|
|
|
|
|
handleSubForm(data, formName) {
|
|
|
|
|
this.subFromName = formName;
|
|
|
|
|
if (formName === "edit") {
|
|
|
|
|
this.formData = Object.assign({}, data);
|
|
|
|
|
this.node = node;
|
|
|
|
|
this.subData = data;
|
|
|
|
|
} else if (formName === "add") {
|
|
|
|
|
this.subData.parentId = data.code;
|
|
|
|
|
}
|
|
|
|
|
this.formData.pid = !this.formData.pid ? "" : this.formData.pid;
|
|
|
|
|
this.formName = formName;
|
|
|
|
|
// if (data && data.id) {
|
|
|
|
|
// this.index = this.mergeList.findIndex((d) => d.id === data.id);
|
|
|
|
|
// }
|
|
|
|
|
;
|
|
|
|
|
this.subFormVisible = true;
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//添加仓库
|
|
|
|
|
formSubmit() {
|
|
|
|
|
this.$refs["dataForm"].validate((valid) => {
|
|
|
|
|
|
|
|
|
@ -872,10 +867,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// const parent = this.node.parent;
|
|
|
|
|
// const children = parent.data.children || parent.data;
|
|
|
|
|
// const index = children.findIndex((d) => d.id === data.id);
|
|
|
|
|
// children.splice(index, 1, data);
|
|
|
|
|
}
|
|
|
|
|
// 刷新表单
|
|
|
|
|
this.resetForm();
|
|
|
|
@ -888,6 +879,22 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//添加分库
|
|
|
|
|
forSubSubmit() {
|
|
|
|
|
saveSubWarehouse(this.subData, this.subFromName).then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.loadSubData(this.subData.parentId);
|
|
|
|
|
this.subFormVisible = false;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
this.subFormVisible = false;
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.subFormVisible = false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// 删除
|
|
|
|
|
handleDel(node, data) {
|
|
|
|
|
if (data.children && data.children.length > 0) {
|
|
|
|
@ -897,7 +904,7 @@ export default {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (data.id) {
|
|
|
|
|
this.$confirm("确认删除该记录吗?", "提示", {
|
|
|
|
|
this.$confirm("确认删除该仓库吗?", "提示", {
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
@ -926,6 +933,36 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleSubDel(row) {
|
|
|
|
|
if (row.id) {
|
|
|
|
|
this.$confirm("确认删除该分库吗?", "提示", {
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.deleteLoading = true;
|
|
|
|
|
let para = {id: row.id};
|
|
|
|
|
deleteSubWarehouse(para)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.deleteLoading = false;
|
|
|
|
|
if (response.code !== 20000) {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
this.$message.success("删除成功");
|
|
|
|
|
this.loadSubData(row.parentId);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.deleteLoading = false;
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$message.info("取消删除");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getProjectNum() {
|
|
|
|
|
const projectTime = new Date() // 当前中国标准时间
|
|
|
|
|
const Year = projectTime.getFullYear() // 获取当前年份 支持IE和火狐浏览器.
|
|
|
|
@ -991,6 +1028,8 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
init() {
|
|
|
|
|
axios.get("./config.json").then(res => {
|
|
|
|
|
// 基础地址
|
|
|
|
@ -1023,12 +1062,41 @@ export default {
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handInvCurrentChange(row) {
|
|
|
|
|
this.radioCheck = row.id;
|
|
|
|
|
this.subList = [];
|
|
|
|
|
this.userList = null;
|
|
|
|
|
this.bussinessTypeList = null;
|
|
|
|
|
this.loadSubData(row.code);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handSubInvCurrentChange(row) {
|
|
|
|
|
this.subRadioCheck = row.id;
|
|
|
|
|
this.currentCode = row.code;
|
|
|
|
|
this.currentRow = row;
|
|
|
|
|
this.loadLinkData(row)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
loadSubData(parentId) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let subQuery = {
|
|
|
|
|
parentId: parentId,
|
|
|
|
|
}
|
|
|
|
|
filterSubAll(subQuery).then((res) => {
|
|
|
|
|
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.subList = res.data;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
loadLinkData(row) {
|
|
|
|
|
let query = {
|
|
|
|
|
code: row.code
|
|
|
|
|
}
|
|
|
|
|
this.currentCode = row.code;
|
|
|
|
|
this.currentRow = row;
|
|
|
|
|
//加载用户数据
|
|
|
|
|
warehouseUserList(query).then((res) => {
|
|
|
|
|
this.userData = res.data;
|
|
|
|
@ -1043,9 +1111,14 @@ export default {
|
|
|
|
|
this.$message.error("单据类型数据加载失败")
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addUser() {
|
|
|
|
|
addUser(row) {
|
|
|
|
|
this.currentCode = row.code;
|
|
|
|
|
this.currentRow = row;
|
|
|
|
|
this.loadLinkData(row);
|
|
|
|
|
if (this.currentCode == null || this.currentCode == '') {
|
|
|
|
|
this.$message.error("请先选择仓库");
|
|
|
|
|
this.$message.error("请先选择分库");
|
|
|
|
|
} else if (this.currentCode != row.code) {
|
|
|
|
|
this.$message.error("请先选择当前分库!")
|
|
|
|
|
} else {
|
|
|
|
|
this.userFormVisible = true;
|
|
|
|
|
getHospitalUserList().then((res) => {
|
|
|
|
@ -1117,9 +1190,14 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
addBussinessType() {
|
|
|
|
|
addBussinessType(row) {
|
|
|
|
|
this.currentCode = row.code;
|
|
|
|
|
this.currentRow = row;
|
|
|
|
|
this.loadLinkData(row);
|
|
|
|
|
if (this.currentCode == null || this.currentCode == '') {
|
|
|
|
|
this.$message.error('请先选择仓库');
|
|
|
|
|
} else if (this.currentCode != row.code) {
|
|
|
|
|
this.$message.error("请先选择当前分库!")
|
|
|
|
|
} else {
|
|
|
|
|
this.bussinessTypeFormVisible = true;
|
|
|
|
|
let query = {
|
|
|
|
@ -1284,7 +1362,8 @@ export default {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
filters: {
|
|
|
|
|
statusFilterType(status) {
|
|
|
|
|
const statusMap = {
|
|
|
|
@ -1292,24 +1371,30 @@ export default {
|
|
|
|
|
1: "success",
|
|
|
|
|
};
|
|
|
|
|
return statusMap[status];
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
statusFilterName(status) {
|
|
|
|
|
const statusMap = {
|
|
|
|
|
0: "禁用",
|
|
|
|
|
1: "正常",
|
|
|
|
|
};
|
|
|
|
|
return statusMap[status];
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
created() {
|
|
|
|
|
// 加载表格数据
|
|
|
|
|
this.init();
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getSyncConfig();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style type="text/scss" lang="scss">
|
|
|
|
|