第三方仓库,仓库信息修改

prod
anthonywj 2 years ago
parent 19d4356b79
commit 50786ad74a

@ -74,6 +74,7 @@
overflow: hidden !important; overflow: hidden !important;
text-overflow: ellipsis !important; text-overflow: ellipsis !important;
white-space: nowrap !important; white-space: nowrap !important;
height: 45px; //
} }
// menu hover // menu hover

@ -51,14 +51,13 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <pagination
:current-page="filterQuery.page" v-show="total>0"
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total" :total="total"
></el-pagination> :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="getList"
/>
<el-dialog <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
:visible.sync="modifySpaceVisible" :visible.sync="modifySpaceVisible"
@ -76,7 +75,6 @@
placeholder="请输入货位编码"></el-input> placeholder="请输入货位编码"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="name" label="货位名称"> <el-form-item prop="name" label="货位名称">
<el-input v-model="formData.name" auto-complete="off" style="width: 90%" <el-input v-model="formData.name" auto-complete="off" style="width: 90%"
@ -84,7 +82,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="remark" label="货位分类"> <el-form-item prop="remark" label="货位分类">
@ -99,7 +96,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col> <el-col>
<el-form-item prop="remark" label="备注"> <el-form-item prop="remark" label="备注">
@ -109,7 +105,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="saveSpace" <el-button type="primary" size="small" icon="search" @click="saveSpace"
>提交 >提交
@ -146,7 +141,7 @@ export default {
invStorageCode: null, invStorageCode: null,
key: null, key: null,
page: 1, page: 1,
limit: 20, limit: 10,
customerId: null, customerId: null,
}, },
list: [], list: [],
@ -204,7 +199,7 @@ export default {
invWarehouseCode: this.invInfo.invWarehouseCode, invWarehouseCode: this.invInfo.invWarehouseCode,
invStorageCode: this.invInfo.invStorageCode, invStorageCode: this.invInfo.invStorageCode,
page: 1, page: 1,
limit: 20, limit: 10,
}; };
this.getList(); this.getList();
}, },

@ -0,0 +1,95 @@
<template>
<div>
<el-form :inline="true" :model="busQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="单据类型名称:">
<el-input
v-model="busQuery.key"
placeholder="请输入单据类型名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="selsectBussinessType"
>重置
</el-button>
<el-button type="primary" @click="selsectBussinessType"
icon="el-icon-search"
>查询
</el-button
>
<el-button type="primary" @click="addBussinessType()"
icon="el-icon-document-add"
>选入单据类型
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table :data="userBussinessTypeList" ref="typeList"
border
style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据类型名称" prop="name"></el-table-column>
<el-table-column label="单据类型编码" prop="action"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native.stop="delWarehouseBussinessType(scope.row.id)"
>移除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="仓库信息-选入单据类型"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="bussinessTypeFormVisible"
>
<el-table v-loading="loading" :data="bussinessTypeList" ref="typeList"
border
style="width: 100%">
<el-table-column
type="selection"
:reserve-selection="true"
width="55">
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据类型编码" prop="action"></el-table-column>
<el-table-column label="单据类型名称" prop="name"></el-table-column>
</el-table>
<pagination
v-show="bussinessTypeTotal>0"
:total="bussinessTypeTotal"
:page.sync="bussinessTypeQuery.page"
:limit.sync="bussinessTypeQuery.limit"
@pagination="getSelectUser"
/>
<div slot="footer" class="dialog-footer">
<el-button @click.native="bussinessTypeFormVisible = !bussinessTypeFormVisible"
>取消
</el-button
>
<el-button
type="primary"
@click.native="addBussinessTypeData()"
>提交
</el-button>
</div>
</el-dialog>
</div>
</template>
<script></script>
<style scoped>
</style>

@ -0,0 +1,312 @@
<template>
<div>
<el-form :inline="true" :model="userQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="用户名称/账号:">
<el-input
v-model="userQuery.key"
placeholder="请输入用户名称或用户账号"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onUserReset"
>重置
</el-button>
<el-button type="primary" @click="loadUserList"
icon="el-icon-search"
>查询
</el-button
>
<el-button type="primary" @click="addUser()"
icon="el-icon-document-add"
>选入用户
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table
:data="userData"
key="row.id"
border
style="width: 100%"
highlight-current-row
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
prop="employeeName"
label="用户名"
min-width="30%">
</el-table-column>
<el-table-column
prop="username"
label="账号"
min-width="20%">
</el-table-column>
<el-table-column
label="操作"
min-width="30%"
>
<template slot-scope="scope">
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native="rmInvUser(scope.row)">
移除
</el-button>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small" :disabled="!configParms.basicInv"-->
<!-- @click.native="rmInvUser(scope.row)">-->
<!-- 授权-->
<!-- </el-button>-->
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native="relBusttype(scope.row)">
管理单据类型
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="userTotal>0"
:total="userTotal"
:page.sync="userQuery.page"
:limit.sync="userQuery.limit"
@pagination="loadUserList"
/>
<!--添加用户弹窗-->
<el-dialog
v-if="userFormVisible"
title="仓库信息-选入用户"
:close-on-click-modal="false"
width="45%"
append-to-body
:close-on-press-escape="false"
:visible.sync="userFormVisible"
>
<el-table v-loading="userloading" :data="selectUserList"
ref="selectUserList"
@selection-change="handleUserSelectionChange"
border
style="width: 100%">
<el-table-column
type="selection"
:reserve-selection="false"
width="55">
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="账号" prop="userName"></el-table-column>
<el-table-column label="用户名" prop="employeeName"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click.native="userFormVisible = !userFormVisible"
>取消
</el-button
>
<el-button
type="primary"
@click.native="addUserData()"
>选入
</el-button>
</div>
<pagination
v-show="selectUserToatl>0"
:total="selectUserToatl"
:page.sync="selectUserQuery.page"
:limit.sync="selectUserQuery.limit"
@pagination="getSelectUser"
/>
</el-dialog>
<!-- 用户业务单据类型关联-->
<el-dialog
title="仓库-用户单据类型管理"
:visible.sync="relBusUserVisile"
width="45%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="relBusUserVisile"
>
<inv-user-rel-bus-types :inputQuery="curSeleUser" :closeDialog="cancelRelBusDiaolog"></inv-user-rel-bus-types>
</el-dialog>
</div>
</template>
<script>
import {addWarehouseUser, deleteWarehouseUser, warehouseUserList} from "@/api/system/invWarehouse";
import {selectNotSelectUser} from "@/api/auth/authUser";
import InvUserRelBusTypes from "@/views/system/dept/invUserRelBusTypes";
export default {
name: "invRelUsers",
components: {InvUserRelBusTypes},
props: {
configParms: {
type: Object,
required: true,
},
inputQuery: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
},
data() {
return {
//-------------------------------------
userQuery: {
code: null,
page: 1,
limit: 10
},
userData: [],
userTotal: 0,
//--------------------
selectUserQuery: {
code: null,
page: 1,
limit: 10
},
userFormVisible: false,
userloading: false,
selectUserList: [],
selectUserToatl: 0,
selectAddUser: [],
//------------------------------
curSeleUser: null,
relBusUserVisile: false,
}
},
methods: {
//
onUserReset() {
this.userQuery = {
code: null,
page: 1,
limit: 10
};
},
loadUserList(val) { //
if (val != null) {
this.userQuery.page = val;
}
//
warehouseUserList(this.userQuery).then((res) => {
this.userData = res.data.list;
this.userTotal = res.data.total;
}).catch((error) => {
this.$message.error("用户数据加载失败")
});
},
addUser() { //
this.currentCode = this.inputQuery.code;
this.userFormVisible = true;
this.selectUserQuery.code = this.inputQuery.code;
this.selectUserQuery.page = 1;
this.getSelectUser();
},
rmInvUser(row) { //
this.$confirm("确定移除该仓库关联用户?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let params = {id: row.id};
deleteWarehouseUser(params).then((res) => {
if (res.code == 20000) {
this.loadUserList();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
});
})
.catch(() => {
});
},
handleUserSelectionChange(val) {
this.selectAddUser = val;
},
getSelectUser() {
selectNotSelectUser(this.selectUserQuery).then((res) => {
this.selectUserList = res.data.list;
this.selectUserToatl = res.data.total;
}).catch((error) => {
this.$message.error("用户数据加载失败")
});
},
addUserData() { //
let query = {
code: this.currentCode,
userList: JSON.stringify(this.selectAddUser)
};
addWarehouseUser(query).then((res) => {
if (res.code === 20000) {
this.userFormVisible = false;
this.$message.success("添加成功");
this.userQuery = {
code: this.currentCode,
page: 1,
limit: 10
}
//
warehouseUserList(this.userQuery).then((res) => {
this.userData = res.data.list;
this.userTotal = res.data.total;
}).catch((error) => {
this.userData = [];
this.userTotal = 0;
});
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error("添加失败");
});
},
//-
relBusttype(row) {
this.curSeleUser = row;
this.relBusUserVisile = true;
},
cancelRelBusDiaolog() {
this.relBusUserVisile = false;
},
},
created() {
this.userQuery.code = this.inputQuery.code;
this.loadUserList();
}
}
</script>
<style scoped>
</style>

@ -1,9 +1,17 @@
<template> <template>
<div style="margin-left: 15px"> <div style="margin-left: 15px">
<el-transfer v-model="value" :data="data" <el-transfer v-model="value" :data="data"
class="edit_dev"
:titles="['未选入单据类型', '已选入单据类型']" :titles="['未选入单据类型', '已选入单据类型']"
:button-texts="['移除', '选入']" >
></el-transfer>
<template slot-scope="scope">
<span>
<span>{{ scope.option.label }}</span>
</span>
</template>
</el-transfer>
<div style="text-align: center;margin-top: 20px"> <div style="text-align: center;margin-top: 20px">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit" <el-button type="primary" size="small" icon="search" @click="onAddSubmit"
>提交 >提交
@ -115,5 +123,13 @@ export default {
</script> </script>
<style scoped> <style scoped>
/*.edit_dev >>> .el-transfer__button {*/
/* display: flex;*/
/*}*/
/*.edit_dev >>> .el-transfer__button {*/
/* display: flex;*/
/* width: 50px;*/
/*}*/
</style> </style>

@ -56,6 +56,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width"> <el-table-column label="操作" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
:disabled="!configParms.basicInv" :disabled="!configParms.basicInv"
@ -63,6 +64,24 @@
>编辑 >编辑
</el-button </el-button
> >
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native.stop="popInvRelUser( scope.row)"
>用户管理
</el-button
>
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native.stop="popInvRelBustype(scope.row)"
>单据类型
</el-button
>
<el-button <el-button
type="text" type="text"
:disabled="!configParms.basicInv" :disabled="!configParms.basicInv"
@ -81,7 +100,7 @@
:limit.sync="query.limit" :limit.sync="query.limit"
@pagination="getList" @pagination="getList"
/> />
<!--仓库编辑界面--> <!--仓库编辑对话框-->
<el-dialog <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -195,236 +214,110 @@
> >
</div> </div>
</el-dialog> </el-dialog>
</el-card> <!-- 仓库关联第三方分库对话框-->
<el-tabs type="border-card" style="margin: 15px"> <el-dialog title="仓库信息-关联第三方仓库" :visible.sync="thrSubWareHouseVisible">
<el-tab-pane> <el-form :inline="true" :model="thirdSubQuery" class="query-form" size="mini">
<span slot="label">{{ currentRow.name }}-用户列表</span> <el-form-item class="query-form-item">
<el-form :inline="true" :model="userQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="用户名称/账号:">
<el-input <el-input
v-model="userQuery.key" v-model="thirdSubQuery.name"
placeholder="请输入用户名称或用户账号"
clearable clearable
placeholder="仓库名称"
style="width: 400px"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button <el-button type="primary" icon="search" @click="intentSubSelect"></el-button>
type="primary"
icon="el-icon-refresh"
@click="onUserReset"
>重置
</el-button>
<el-button type="primary" @click="onUserReset"
icon="el-icon-search"
>查询
</el-button
>
<el-button type="primary" @click="addUser()"
icon="el-icon-document-add"
>选入用户
</el-button
>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
:data="userData" :data="thrSubWarehouseData"
key="row.id" style="width: 100%;margin-top: 10px;"
row-key="id"
border border
style="width: 100%"
highlight-current-row highlight-current-row
@current-change="changeSubThrWarehouse"
> >
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
prop="employeeName" type="index"
label="用户名" label="序号"
min-width="30%"> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="username" prop="code"
label="账号" label="仓库编码"
min-width="20%"> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" prop="name"
min-width="30%" label="仓库名称"
> >
<template slot-scope="scope">
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native="rmInvUser(scope.row)">
移除
</el-button>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small" :disabled="!configParms.basicInv"-->
<!-- @click.native="rmInvUser(scope.row)">-->
<!-- 授权-->
<!-- </el-button>-->
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native="relBusttype(scope.row)">
管理单据类型
</el-button>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane>
<el-tab-pane>
<span slot="label">{{ currentRow.name }}-单据类型</span>
<el-form :inline="true" :model="userQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="单据类型名称:">
<el-input
v-model="userQuery.key"
placeholder="请输入单据类型名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="selsectBussinessType"
>重置
</el-button>
<el-button type="primary" @click="selsectBussinessType"
icon="el-icon-search"
>查询
</el-button
>
<el-button type="primary" @click="addBussinessType()"
icon="el-icon-document-add"
>选入单据类型
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table :data="userBussinessTypeList" ref="typeList" <pagination
border v-show="subTotal>0"
style="width: 100%"> :total="subTotal"
<el-table-column label="序号" type="index"></el-table-column> :page.sync="thirdSubQuery.page"
<el-table-column label="单据类型名称" prop="name"></el-table-column> :limit.sync="thirdSubQuery.limit"
<el-table-column label="单据类型编码" prop="action"></el-table-column> @pagination="getList"
<el-table-column label="操作"> />
<template slot-scope="scope">
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native.stop="delWarehouseBussinessType(scope.row.id)"
>移除
</el-button
>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane>
<span slot="label">{{ currentRow.name }}-货位信息</span>
<invSpaceManage :invInfo="currentInvInfo"></invSpaceManage>
</el-tab-pane>
</el-tabs>
<!--添加用户弹窗-->
<el-dialog
v-if="userFormVisible"
title="仓库信息-选入用户"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="userFormVisible"
>
<el-table v-loading="userloading" :data="selectUserList"
ref="selectUserList"
@selection-change="handleUserSelectionChange"
border
style="width: 100%">
<el-table-column
type="selection"
:reserve-selection="false"
width="55">
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="账号" prop="userName"></el-table-column>
<el-table-column label="用户名" prop="employeeName"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click.native="userFormVisible = !userFormVisible" <el-button @click.native="hideThrWarehouseTable()">取消</el-button>
>取消
</el-button
>
<el-button <el-button
type="primary" type="primary"
@click.native="addUserData()" @click.native="bindSubThrWarehouse()"
>选入 >提交
</el-button> </el-button>
</div> </div>
<pagination
v-show="selectUserToatl>0"
:total="selectUserToatl"
:page.sync="selectUserQuery.page"
:limit.sync="selectUserQuery.limit"
@pagination="getSelectUser"
/>
</el-dialog> </el-dialog>
<!--选入单据类型弹窗--> <!-- 仓库关联用户对话框-->
<el-dialog <el-dialog
title="仓库信息-选入单据类型" title="仓库-用户管理"
:visible.sync="relUserVisible"
width="60%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:visible.sync="bussinessTypeFormVisible" v-if="relUserVisible"
> >
<el-table v-loading="loading" :data="bussinessTypeList" ref="typeList" <inv-rel-users :inputQuery="currentRow"
border :configParms="configParms"
style="width: 100%"> :closeDialog="cancelRelUser"
<el-table-column ></inv-rel-users>
type="selection"
:reserve-selection="true"
width="55">
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据类型编码" prop="action"></el-table-column>
<el-table-column label="单据类型名称" prop="name"></el-table-column>
</el-table>
<pagination
v-show="bussinessTypeTotal>0"
:total="bussinessTypeTotal"
:page.sync="bussinessTypeQuery.page"
:limit.sync="bussinessTypeQuery.limit"
@pagination="getSelectUser"
/>
<div slot="footer" class="dialog-footer">
<el-button @click.native="bussinessTypeFormVisible = !bussinessTypeFormVisible"
>取消
</el-button
>
<el-button
type="primary"
@click.native="addBussinessTypeData()"
>提交
</el-button>
</div>
</el-dialog> </el-dialog>
<!-- 用户业务单据类型关联--> <!-- 仓库关联单据类型对话框-->
<el-dialog <el-dialog
title="仓库-用户单据类型管理" title="仓库-单据类型"
:visible.sync="relBusUserVisile" :visible.sync="relBusTypeVisible"
width="45%" width="45%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="relBusUserVisile" v-if="relBusTypeVisible"
> >
<relBusUserDialog :inputQuery="curSeleUser" :closeDialog="cancelRelBusDiaolog"></relBusUserDialog> <inv-rel-bus-type :inputQuery="currentRow"
:configParms="configParms"
:closeDialog="cancelRelBustype"
></inv-rel-bus-type>
</el-dialog> </el-dialog>
</el-card>
<el-tabs type="border-card" style="margin: 15px">
<!-- <el-tab-pane>-->
<!-- <span slot="label">{{ currentRow.name }}-用户列表</span>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane>-->
<!-- <span slot="label">{{ currentRow.name }}-单据类型</span>-->
<!-- </el-tab-pane>-->
<el-tab-pane>
<span slot="label">{{ currentRow.name }}-货位信息</span>
<invSpaceManage :invInfo="currentInvInfo"></invSpaceManage>
</el-tab-pane>
</el-tabs>
</div> </div>
</template> </template>
@ -437,16 +330,17 @@ import {
import {getHospitalUserList, selectNotSelectUser} from "@/api/auth/authUser"; import {getHospitalUserList, selectNotSelectUser} from "@/api/auth/authUser";
import {getJoinBussinessType} from "@/api/basic/bussinessType"; import {getJoinBussinessType} from "@/api/basic/bussinessType";
import {findConfig} from "@/api/thrsys/spsSyncStatus"; import {findConfig} from "@/api/thrsys/spsSyncStatus";
import relBusUserDialog from "./invUserRelBusTypes";
import {selectSysParamByKey} from "@/api/system/param/systemParamConfig"; import {selectSysParamByKey} from "@/api/system/param/systemParamConfig";
import invSpaceManage from "@/views/inventory/InvSpaceManage"; import invSpaceManage from "@/views/inventory/InvSpaceManage";
import { import {
addWarehouseUser, deleteWarehouseBussinessType, deleteWarehouseUser, filterList, addWarehouseUser, deleteWarehouseBussinessType, deleteWarehouseUser, filterList, filterThridSubByInv,
warehouseBussinessTypeList, warehouseBussinessTypeList,
warehouseUserList warehouseUserList
} from "@/api/system/invWarehouse"; } from "@/api/system/invWarehouse";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import InvRelBusType from "@/views/system/dept/invRelBusType";
import InvRelUsers from "@/views/system/dept/invRelUsers";
export default { export default {
data() { data() {
@ -484,47 +378,20 @@ export default {
subData: {}, subData: {},
fromDeptOptions: [], fromDeptOptions: [],
invOptions: [], invOptions: [],
thirdSubQuery: {
parentId: null,
//------------------------------------- name: null,
userQuery: {
code: null,
page: 1,
limit: 10
},
userData: [],
userTotal: 0,
//--------------------
selectUserQuery: {
code: null,
page: 1,
limit: 10
},
userFormVisible: false,
userloading: false,
selectUserList: [],
selectUserToatl: 0,
selectAddUser: [],
//------------------------------
curSeleUser: null,
relBusUserVisile: false,
userBussinessTypeList: [],
bussinessTypeTotal: 0,
bussinessTypeQuery: {
enabled: true,
page: 1, page: 1,
limit: 10, limit: 10,
ids: "" thirdSysFk: "thirdId",
}, },
thrSubWareHouseVisible: false,
thrSubWarehouseData: [],
checkSubThrWarehouseRow: null,
subTotal: 0,
busQuery: { relBusTypeVisible: false,
code: null, relUserVisible: false,
page: 1,
limit: 10
},
selectBussinessTypeList: [],
bussinessTypeFormVisible: false,
// //
currentInvInfo: { currentInvInfo: {
@ -546,7 +413,6 @@ export default {
name: "", name: "",
status: "", status: "",
}; };
this.userQuery.page = 1;
this.busQuery.page = 1; this.busQuery.page = 1;
this.getList(); this.getList();
}, },
@ -571,7 +437,6 @@ export default {
}); });
}, },
handleSubForm(data, formName) { // handleSubForm(data, formName) { //
this.formName = formName; this.formName = formName;
if (formName === "edit") { if (formName === "edit") {
this.subData = JSON.parse(JSON.stringify(data)); this.subData = JSON.parse(JSON.stringify(data));
@ -661,165 +526,104 @@ export default {
this.currentCode = row.code; this.currentCode = row.code;
this.currentRow = row; this.currentRow = row;
this.curSeleUser = null; this.curSeleUser = null;
//
this.loadLinkData(row)
// //
this.selsectBussinessType(row); this.selsectBussinessType(row);
// //
this.invSpaceManage(row); this.invSpaceManage(row);
}, },
//
intentSubSelect(row) {
//------------------------- if (row != null) {
loadUserList(val) { // if (row.sysId != null && row.sysId != undefined) {
if (val != null) { this.thirdSubQuery.thirdSysFk = row.sysId;
this.userQuery.page = val;
} }
// }
warehouseUserList(this.userQuery).then((res) => { this.thrSubWarehouseData = [];
this.userData = res.data.list; this.thrSubWareHouseVisible = true;
this.userTotal = res.data.total; filterThridSubByInv(this.thirdSubQuery).then((res) => {
}).catch((error) => {
this.$message.error("用户数据加载失败")
});
},
rmInvUser(row) { //
this.$confirm("确定移除该仓库关联用户?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let params = {id: row.id};
deleteWarehouseUser(params).then((res) => {
if (res.code == 20000) { if (res.code == 20000) {
this.loadUserList(); this.thrSubWarehouseData = res.data.list;
this.subTotal = res.data.total || 0;
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
} }
}).catch((error) => {
});
}) }).catch((error) => {
.catch(() => { this.thrWarehouseData = [];
this.subTotal = 0;
this.$message.error("第三方分库库数据加载失败");
}); });
}, },
changeSubThrWarehouse(row) {
this.checkSubThrWarehouseRow = row;
loadLinkData(row) {
this.userQuery.page = 1;
this.userQuery.code = row.code;
this.curSeleUser = null;
//
this.loadUserList();
}, },
hideThrWarehouseTable() {
this.thrWareHouseVisible = false;
// this.thrSubWareHouseVisible = false;
addUser() {
this.currentCode = this.currentRow.code;
this.userFormVisible = true;
this.selectUserQuery.code = this.currentRow.code;
this.selectUserQuery.page = 1;
this.getSelectUser();
},
handleUserSelectionChange(val) {
this.selectAddUser = val;
}, },
//
getSelectUser() { bindSubThrWarehouse() {
selectNotSelectUser(this.selectUserQuery).then((res) => { let params = {
this.selectUserList = res.data.list; id: this.subData.id,
this.selectUserToatl = res.data.total; thridWarehouseId: this.checkSubThrWarehouseRow.code,
sysId: this.checkSubThrWarehouseRow.thirdSysFk
}
bindThrSubWarehouse(params).then((res) => {
if (res.code == 20000) {
this.$message.success("绑定成功")
this.getSubThrsysDetailData();
}
this.thrSubWareHouseVisible = false;
}).catch((error) => { }).catch((error) => {
this.$message.error("用户数据加载失败") this.$message.error("绑定失败");
}); this.thrSubWareHouseVisible = false;
})
}, },
//
unbindSubThrWarehouse(row) {
addUserData() { this.$confirm("确定解绑已关联第三方仓库信息?", "提示", {
let query = { confirmButtonText: "确定",
code: this.currentCode, cancelButtonText: "取消",
userList: JSON.stringify(this.selectAddUser) type: "warning",
})
.then(() => {
let params = {
id: this.subData.id,
sysId: row.sysId
}; };
addWarehouseUser(query).then((res) => { unbindSubThrWarehouse(params).then((res) => {
if (res.code === 20000) { this.$message.success("解绑成功");
this.userFormVisible = false; this.getSubThrsysDetailData();
this.$message.success("添加成功");
this.userQuery = {
code: this.currentCode,
page: 1,
limit: 10
}
//
warehouseUserList(this.userQuery).then((res) => {
this.userData = res.data.list;
this.userTotal = res.data.total;
}).catch((error) => {
this.userData = [];
this.userTotal = 0;
});
} else {
this.$message.error(res.message);
}
}).catch((error) => { }).catch((error) => {
this.$message.error("添加失败"); this.$message.error("解绑失败");
})
})
.catch(() => {
}); });
},
relBusttype(row) {
this.curSeleUser = row;
this.relBusUserVisile = true;
}, },
cancelRelBusDiaolog() { popInvRelBustype(row) {
this.relBusUserVisile = false; this.relBusTypeVisible = true;
this.getUserBusTypeList(1); this.currentRow = row;
}, },
cancelRelBustype() {
selsectBussinessType() { this.relBusTypeVisible = false;
var busQuery = {
code: this.currentCode,
page: 1,
limit: 50
}
warehouseBussinessTypeList(busQuery).then((res) => {
this.userBussinessTypeList = res.data.list;
}).catch((error) => {
this.$message.error("单据类型数据加载失败")
});
}, },
popInvRelUser(row) {
this.relUserVisible = true;
this.currentRow = row;
},
delWarehouseBussinessType(id) { cancelRelUser() {
let params = {id: id}; this.relUserVisible = false;
deleteWarehouseBussinessType(params).then((res) => {
if (res.code == 20000) {
this.$message.success("已移除");
this.bussinessTypeData = [];
this.selectWhouseBussinessType();
var busQuerys = {
code: this.currentCode,
page: 1,
limit: 10
}
warehouseBussinessTypeList(busQuerys).then((res) => {
this.bussinessTypeData = res.data.list;
}).catch((error) => {
this.$message.error("单据类型数据加载失败")
});
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error("移除失败");
})
}, },
addBussinessType(row) { addBussinessType(row) {
var action = []; var action = [];
for (var i = 0; i < this.userBussinessTypeList.length; i++) { for (var i = 0; i < this.userBussinessTypeList.length; i++) {
@ -885,7 +689,8 @@ export default {
mounted() { mounted() {
}, },
components: { components: {
relBusUserDialog, InvRelUsers,
InvRelBusType,
invSpaceManage, Treeselect invSpaceManage, Treeselect
}, },
created() { created() {

@ -1,134 +0,0 @@
<template>
<div>
<el-table
:data="bussinessTypeData"
key="row.id"
ref="fileTable"
@selection-change="handleSelectionChange"
style="width: 100%">
<el-table-column type="selection" width="55"
></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
prop="action"
label="单据类型编码"
min-width="30%">
</el-table-column>
<el-table-column
prop="name"
label="单据类型名称"
min-width="30%">
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 20px">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</div>
</template>
<script>
import {
filterSelectInvUser, updateInvUser
} from "@/api/basic/invRelBusTypes";
export default {
name: "inputQuery",
props: {
inputQuery: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
},
data() {
return {
filterQuery: {
subInvCode: null,
userId: null,
},
bussinessTypeData: null,
multipleSelection: []
}
},
methods: {
getList() {
this.filterQuery = {
subInvCode: this.inputQuery.code,
userId: this.inputQuery.userid,
};
filterSelectInvUser(this.filterQuery).then((res) => {
if (res.code == 20000) {
this.bussinessTypeData = res.data;
this.$nextTick(() => {
for (let i = 0; i < this.bussinessTypeData.length; i++) {
this.$refs.fileTable.toggleRowSelection(this.bussinessTypeData[i], this.bussinessTypeData[i].select)
}
});
} else {
this.$message.error(res.message);
}
}).catch((error) => {
});
},
checkSelectable(row) {
return !row.select;
},
cancelDialog() {
this.closeDialog();
},
onAddSubmit() {
let postRequesty = {
subInvCode: this.inputQuery.code,
userId: this.inputQuery.userid,
invBusUserEntities: [],
};
let datas = [];
this.multipleSelection.forEach((obj) => {
datas.push(obj);
});
postRequesty.invBusUserEntities = datas;
updateInvUser(postRequesty).then((res) => {
if (res.code == 20000) {
this.closeDialog();
} else {
this.$message.error(res.message);
}
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
created() {
this.getList();
},
};
</script>

@ -9,13 +9,6 @@
placeholder="关键字搜索" placeholder="关键字搜索"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" label="仓库类型:">
<el-select v-model="query.advanceType" placeholder="请选择仓库类型" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="寄售" value=true></el-option>
<el-option label="仓库" value=false></el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" label="第三方系统:"> <el-form-item class="query-form-item" label="第三方系统:">
<el-select v-model="query.thirdSysFk" placeholder="请选择第三方系统" <el-select v-model="query.thirdSysFk" placeholder="请选择第三方系统"
@change="thirdSysFkChange()"> @change="thirdSysFkChange()">
@ -33,7 +26,7 @@
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button> <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
<el-button type="primary" @click.native="handleForm(null, null,'addTop')" <el-button type="primary" @click.native="handleForm(null, null,'addTop')"
icon="el-icon-plus" :disabled="!configParms.basicThirdInv" icon="el-icon-plus" :disabled="!configParms.basicThirdInv"
>添加仓库 >添加部门/科室
</el-button> </el-button>
<el-button type="primary" @click.native="downloadWarehouse()" <el-button type="primary" @click.native="downloadWarehouse()"
icon="el-icon-download" icon="el-icon-download"
@ -54,21 +47,21 @@
<el-table-column type="index" label="序号" width="50"></el-table-column> <el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column <el-table-column
prop="code" prop="code"
label="仓库编码" label="部门编码"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="仓库名称" label="部门名称"
> >
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column-->
prop="advanceType" <!-- prop="advanceType"-->
label="仓库类型"> <!-- label="仓库类型">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span>{{ enableMap[scope.row.advanceType] }}</span> <!-- <span>{{ enableMap[scope.row.advanceType] }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column prop="thirdName" label="第三方系统名称"> <el-table-column prop="thirdName" label="第三方系统名称">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getThirdSysFkName(scope.row.thirdSysFk) }}</span> <span>{{ getThirdSysFkName(scope.row.thirdSysFk) }}</span>
@ -82,7 +75,7 @@
size="small" size="small"
@click.native.stop="handleSubForm( scope.row, 'add')" @click.native.stop="handleSubForm( scope.row, 'add')"
:disabled="!configParms.basicThirdInv" :disabled="!configParms.basicThirdInv"
>添加 >添加
</el-button </el-button
> >
@ -112,56 +105,59 @@
:limit.sync="query.limit" :limit.sync="query.limit"
@pagination="getList" @pagination="getList"
/> />
<!-- <el-table-->
<!-- :data="subList"-->
<!-- border-->
<!-- highlight-current-row-->
<!-- style="width: 100%;margin-top: 35px">-->
<!-- <el-table-column type="index" label="序号" width="50"></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="parentName"-->
<!-- label="所属仓库"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- :disabled="!configParms.basicThirdInv"-->
<!-- @click.native.stop="handleSubForm( scope.row, 'edit')"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- :disabled="!configParms.basicThirdInv"-->
<!-- @click.native.stop="handleSubDel(scope.row)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>--> </el-card>
<!-- </el-table>--> <el-card>
<!-- <pagination--> <el-table
<!-- v-show="subTotal>0"--> :data="subList"
<!-- :total="subTotal"--> border
<!-- :page.sync="subQuery.page"--> highlight-current-row
<!-- :limit.sync="subQuery.limit"--> style="width: 100%;margin-top: 35px">
<!-- @pagination="getSubList"--> <el-table-column type="index" label="序号" width="50"></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="parentName"
label="所属部门"
>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="!configParms.basicThirdInv"
@click.native.stop="handleSubForm( scope.row, 'edit')"
>编辑
</el-button
>
<el-button
type="text"
size="small"
:disabled="!configParms.basicThirdInv"
@click.native.stop="handleSubDel(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="subTotal>0"
:total="subTotal"
:page.sync="subQuery.page"
:limit.sync="subQuery.limit"
@pagination="getSubList"
/>
</el-card> </el-card>
<!--仓库弹窗编辑页面--> <!--仓库弹窗编辑页面-->
<el-dialog <el-dialog
@ -186,12 +182,12 @@
auto-complete="off" auto-complete="off"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" prop="advanceType" label="仓库类型" label-width="100px"> <!-- <el-form-item class="query-form-item" prop="advanceType" label="仓库类型" label-width="100px">-->
<el-select v-model="formData.advanceType" placeholder="仓库类型" clearable style="width: 80%"> <!-- <el-select v-model="formData.advanceType" placeholder="仓库类型" clearable style="width: 80%">-->
<el-option label="寄售" :value='true'></el-option> <!-- <el-option label="寄售" :value='true'></el-option>-->
<el-option label="仓库" :value='false'></el-option> <!-- <el-option label="仓库" :value='false'></el-option>-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item class="query-form-item" prop="thirdSysFk" label="第三方系统" label-width="100px"> <el-form-item class="query-form-item" prop="thirdSysFk" label="第三方系统" label-width="100px">
<el-select v-model="formData.thirdSysFk" placeholder="请选择第三方系统" clearable style="width: 80%"> <el-select v-model="formData.thirdSysFk" placeholder="请选择第三方系统" clearable style="width: 80%">
<el-option <el-option
@ -338,8 +334,8 @@ export default {
edit: "仓库信息-编辑" edit: "仓库信息-编辑"
}, },
subMap: { subMap: {
add: "库信息-添加", add: "库信息-添加",
edit: "库信息-编辑" edit: "库信息-编辑"
}, },
enableMap: { enableMap: {
true: "寄售", true: "寄售",

Loading…
Cancel
Save