分库功能

fencang
anthonywj 3 years ago
parent d1f973ecda
commit ea5d76e1c3

@ -1,5 +1,5 @@
{ {
"BASE_URL": "http://192.168.0.109:9996", "BASE_URL": "http://192.168.1.2:9996",
"SERVER_IP": "http://192.168.0.109:9996", "SERVER_IP": "http://192.168.1.2:9996",
"hosp_name": "诏安县总医院(测试)" "hosp_name": "诏安县总医院(测试)"
} }

@ -60,3 +60,12 @@ export function authAdminDelete(data) {
data: data data: data
}); });
} }
export function updateInv(data) {
return axios({
url: "/admin/auth/admin/updateInv",
method: "post",
data: data
});
}

@ -0,0 +1,42 @@
import axios from "../../utils/axios";
export function filterSubAll(query) {
return axios({
url: "/spms/sub/inv/warehouse/filter",
method: "get",
params: query
});
}
export function filterSubByInv(query) {
return axios({
url: "/spms/sub/inv/warehouse/findByInv",
method: "get",
params: query
});
}
// 保存
export function saveSubWarehouse(data, formName, method = "post") {
let url =
formName !== "edit"
? "/spms/sub/inv/warehouse/save"
: "/spms/sub/inv/warehouse/edit";
return axios({
url: url,
method: method,
data: data
});
}
// 删除
export function deleteSubWarehouse(data) {
return axios({
url: "/spms/sub/inv/warehouse/delete",
method: "post",
data: data
});
}

@ -17,6 +17,7 @@ import {
} from "../../utils/auth"; } from "../../utils/auth";
// import { $NOT_NETWORK } from '../../utils/errorCode' // import { $NOT_NETWORK } from '../../utils/errorCode'
import { Message } from "element-ui"; import { Message } from "element-ui";
import {RECEIVE_LOCINVCODE, RECEIVE_LOCSUBINVCODE} from "../mutation-types";
// initial state // initial state
const state = { const state = {
@ -29,6 +30,8 @@ const state = {
routers: constantRouterMap, // 路由列表 routers: constantRouterMap, // 路由列表
customerId:getCustomerId(), customerId:getCustomerId(),
companyName:getCompanyName(), companyName:getCompanyName(),
locInvCode:"",
locSubInvCode:""
}; };
// getters // getters
@ -42,13 +45,14 @@ const getters = {
routers: state => state.routers, routers: state => state.routers,
customerId:state => state.customerId, customerId:state => state.customerId,
companyName:state => state.companyName, companyName:state => state.companyName,
locInvCode:state => state.locInvCode,
locSubInvCode:state => state.locSubInvCode,
}; };
// actions // actions
const actions = { const actions = {
// 用户名登录 // 用户名登录
loginName({ commit }, userInfo) { loginName({ commit }, userInfo) {
console.log(userInfo.userName+"=----"+userInfo.pwd);
const userName = userInfo.userName ? userInfo.userName.trim() : ""; const userName = userInfo.userName ? userInfo.userName.trim() : "";
const pwd = userInfo.pwd ? userInfo.pwd : ""; const pwd = userInfo.pwd ? userInfo.pwd : "";
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@ -80,20 +84,10 @@ const actions = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
userInfo() userInfo()
.then(response => { .then(response => {
console.log("````````1````````");
console.log("````````2````````");
console.log("````````3````````");
console.log(response);
console.log("````````3````````");
console.log("````````2````````");
console.log("````````1````````");
console.log(response.code+"---"+response.data);
console.log(response.data);
if (response.code !== 20000) { if (response.code !== 20000) {
reject("登录失效"); reject("登录失效");
} }
const data = response.data || {}; const data = response.data || {};
console.log(data.userName+"--"+ data.authRules);
commit(types.RECEIVE_ADMIN_NAME, data.userName); commit(types.RECEIVE_ADMIN_NAME, data.userName);
commit(types.RECEIVE_ADMIN_EMPLOYEE_NAME, data.employeeName); commit(types.RECEIVE_ADMIN_EMPLOYEE_NAME, data.employeeName);
commit(types.RECEIVE_ADMIN_AVATAR, data.avatar); commit(types.RECEIVE_ADMIN_AVATAR, data.avatar);
@ -200,7 +194,13 @@ const mutations = {
[types.RECEIVE_ROUTERS](state, routers) { [types.RECEIVE_ROUTERS](state, routers) {
const tempRm = constantRouterMap.concat(routers); const tempRm = constantRouterMap.concat(routers);
state.routers = JSON.parse(JSON.stringify(tempRm)); state.routers = JSON.parse(JSON.stringify(tempRm));
} },
[types.RECEIVE_LOCINVCODE](state, locInvCode) {
state.locInvCode = locInvCode;
},
[types.RECEIVE_LOCSUBINVCODE](state, locSubInvCode) {
state.locSubInvCode = locSubInvCode;
},
}; };
export default { export default {

@ -14,3 +14,8 @@ export const RECEIVE_ADMIN_AUTH_RULES = "RECEIVE_ADMIN_AUTH_RULES"; // 权限列
export const RECEIVE_ROUTERS = "RECEIVE_ROUTERS"; // 初始化路由表 export const RECEIVE_ROUTERS = "RECEIVE_ROUTERS"; // 初始化路由表
export const RECEIVE_CUSTOMERID = "RECEIVE_CUSTOMERID"; // 客户ID export const RECEIVE_CUSTOMERID = "RECEIVE_CUSTOMERID"; // 客户ID
export const RECEIVE_COMPANYNAME = "RECEIVE_COMPANYNAME"; // 企业名称 export const RECEIVE_COMPANYNAME = "RECEIVE_COMPANYNAME"; // 企业名称
export const RECEIVE_LOCINVCODE = "RECEIVE_LOCINVCODE"; // 当前仓库
export const RECEIVE_LOCSUBINVCODE = "RECEIVE_LOCSUBINVCODE"; // 当前分库

@ -131,6 +131,8 @@ export default {
entrustAction: null, entrustAction: null,
finishRece: false, finishRece: false,
curInv: "", curInv: "",
entrustSubInv: "",
invWarehouseCode: "",
}, },
enableMap: { enableMap: {
true: "是", true: "是",

@ -22,6 +22,31 @@
</div> </div>
</el-col> </el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>当前分库:&nbsp;</span>
</div>
<el-select v-model="inputQuery.invWarehouseCode" placeholder="当前分库"
@change="subInvChange"
clearable>
<el-option
v-for="item in subInvList"
:key="item.code"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<div class="text item"> <div class="text item">
<div class="itemTag"> <div class="itemTag">
@ -39,8 +64,14 @@
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.finishRece">
</el-checkbox>
</div>
</el-col>
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<div class="text item"> <div class="text item">
@ -61,18 +92,22 @@
</div> </div>
</el-col> </el-col>
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<div class="text item"> <div class="text item">
<div class="itemTag"> <div class="itemTag">
<span>接受委托:&nbsp;</span> <span>接受委托分库:&nbsp;</span>
</div> </div>
<el-select v-model="inputQuery.entrustUser" placeholder="接受委托人" clearable> <el-select v-model="inputQuery.entrustSubInv" placeholder="接受委托分库"
@change="entrustSubInvChange"
clearable>
<el-option <el-option
v-for="item in entrustUserArray" v-for="item in entrustSubInvList"
:key="item.userid" :key="item.code"
:label="item.employeeName" :label="item.name"
:value="item.userid"> :value="item.code">
<span style="float: left">{{ item.employeeName }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
@ -101,12 +136,26 @@
</el-select> </el-select>
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="el-col"> <el-col :span="10" class="el-col">
<div class="text item"> <div class="text item">
<el-checkbox v-model="inputQuery.finishRece"> <div class="itemTag">
</el-checkbox> <span>接受委托人:&nbsp;</span>
</div>
<el-select v-model="inputQuery.entrustUser" placeholder="接受委托人" clearable>
<el-option
v-for="item in entrustUserArray"
:key="item.userid"
:label="item.employeeName"
:value="item.userid">
<span style="float: left">{{ item.employeeName }}</span>
</el-option>
</el-select>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
@ -124,6 +173,7 @@ import {
import {filterAll, filterNext, warehouseBussinessTypeList, warehouseUserList} from "@/api/basic/invWarehouse"; import {filterAll, filterNext, warehouseBussinessTypeList, warehouseUserList} from "@/api/basic/invWarehouse";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {filterNoUseBusType} from "@/api/basic/EntrustRece"; import {filterNoUseBusType} from "@/api/basic/EntrustRece";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
@ -143,6 +193,8 @@ export default {
isFilterBind: true, isFilterBind: true,
}, },
storageList: [], storageList: [],
subInvList: [],
entrustSubInvList:[],
entrustStorageList: [], entrustStorageList: [],
orderTypeList: [], orderTypeList: [],
fromSpecialOptions: [], fromSpecialOptions: [],
@ -193,24 +245,57 @@ export default {
filterAll() filterAll()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
this.findSubInvByInv();
this.getEntrustStorage();
})
.catch(() => {
});
},
findSubInvByInv() {
this.subInvList = [];
let query = {
pcode: this.inputQuery.curInv
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
this.getOrderType();
}) })
.catch(() => { .catch(() => {
}); });
}, },
findEntrustSubInvByInv() {
this.entrustSubInvList = [];
let query = {
pcode: this.inputQuery.entrustInv
};
filterSubByInv(query)
.then((response) => {
this.entrustSubInvList = response.data || [];
this.entrustSubInvChange();
})
.catch(() => {
});
},
getEntrustStorage() { getEntrustStorage() {
this.entrustStorageList = []; this.entrustStorageList = [];
let nextQuery = {pcode: this.inputQuery.curInv}; let nextQuery = {pcode: this.inputQuery.curInv};
filterNext(nextQuery) filterNext(nextQuery)
.then((response) => { .then((response) => {
this.entrustStorageList = response.data || []; this.entrustStorageList = response.data || [];
this.findEntrustSubInvByInv();
}) })
.catch(() => { .catch(() => {
}); });
}, },
getOrderType(code) { getOrderType() {
let query = { let query = {
locInvCode: code locSubInvCode: this.inputQuery.invWarehouseCode
} }
filterNoUseBusType(query).then((response) => { filterNoUseBusType(query).then((response) => {
this.busTypes = response.data || []; this.busTypes = response.data || [];
@ -218,21 +303,31 @@ export default {
}) })
}, },
invChange(code) { invChange() {
this.getOrderType(code);
this.findSubInvByInv();
this.$set(this.inputQuery, "entrustUser", ""); this.$set(this.inputQuery, "entrustUser", "");
this.$set(this.inputQuery, "entrustInv", ""); this.$set(this.inputQuery, "entrustInv", "");
this.getEntrustStorage(); this.getEntrustStorage();
}, },
entrustInvChange(code) { subInvChange(){
this.getOrderType();
},
entrustInvChange() {
this.findEntrustSubInvByInv();
this.$forceUpdate();
},
entrustSubInvChange(){
let query = { let query = {
code: code code: this.inputQuery.entrustSubInv,
} }
// this.$set(this.inputQuery, "entrustUser","");
// this.$set(this.inputQuery, "entrustAction","");
this.$forceUpdate();
// //
warehouseUserList(query).then((res) => { warehouseUserList(query).then((res) => {
this.entrustUserArray = []; this.entrustUserArray = [];
@ -248,8 +343,6 @@ export default {
}).catch((error) => { }).catch((error) => {
this.$message.error("单据类型数据加载失败") this.$message.error("单据类型数据加载失败")
}); });
}, },
}, },
@ -261,10 +354,10 @@ export default {
created() { created() {
this.getOrderType(null);
this.getList(); this.getList();
this.getStorage(); this.getStorage();
this.getEntrustStorage();
if (this.$isNotBlank(this.inputQuery.entrustInv)) { if (this.$isNotBlank(this.inputQuery.entrustInv)) {
this.entrustInvChange(this.inputQuery.entrustInv); this.entrustInvChange(this.inputQuery.entrustInv);
} }

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

@ -26,7 +26,6 @@
<!--<i class="el-icon-setting" style="margin-right: 15px"></i>--> <!--<i class="el-icon-setting" style="margin-right: 15px"></i>-->
<span>{{username}}</span><i class="el-icon-arrow-down el-icon--right"></i> <span>{{username}}</span><i class="el-icon-arrow-down el-icon--right"></i>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item><span @click="handlePassword"></span></el-dropdown-item>
<el-dropdown-item><span @click="loginOut">退</span></el-dropdown-item> <el-dropdown-item><span @click="loginOut">退</span></el-dropdown-item>
<el-dropdown-item disabled divided>主题切换</el-dropdown-item> <el-dropdown-item disabled divided>主题切换</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>

File diff suppressed because it is too large Load Diff

@ -50,6 +50,7 @@
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.invStorageCode" placeholder="请选择当前仓库" clearable="true" <el-select v-model="filterQuery.invStorageCode" placeholder="请选择当前仓库" clearable="true"
@change="invChange"
size="mini"> size="mini">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
@ -60,6 +61,18 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button <el-button
@ -154,6 +167,7 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {filterAllByUser, filterUplLocInv} from "@/api/basic/invWarehouse"; import {filterAllByUser, filterUplLocInv} from "@/api/basic/invWarehouse";
import {filterCustomers} from "@/api/auth/customer"; import {filterCustomers} from "@/api/auth/customer";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
@ -179,6 +193,7 @@ export default {
}, },
list: [], list: [],
storageList: [], storageList: [],
subInvList: [],
codeDetailVisible: false, codeDetailVisible: false,
total: 0, total: 0,
loading: true, loading: true,
@ -323,6 +338,20 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.filterQuery.invStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
intentDetail(row) { intentDetail(row) {
this.idQuery = row; this.idQuery = row;

@ -11,19 +11,6 @@
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="filterQuery.id" placeholder="单号"></el-input> <el-input v-model="filterQuery.id" placeholder="单号"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item class="query-form-item">-->
<!-- <el-select-->
<!-- v-model="filterQuery.status"-->
<!-- placeholder="校验状态"-->
<!-- >-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="校验成功" :value="4"></el-option>-->
<!-- <el-option label="校验异常" :value="3"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select <el-select
v-model="filterQuery.mainAction" v-model="filterQuery.mainAction"
@ -48,6 +35,7 @@
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true" <el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true"
@change="invChange"
size="mini"> size="mini">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
@ -59,6 +47,19 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px" <span style="color: #000; margin-left: 10px; margin-right: 6px"
>创建日期:</span >创建日期:</span
> >
@ -501,6 +502,7 @@ import selectRlDialog from "./DialogSelectRl";
import {getBussinessType} from "../../api/basic/bussinessType"; import {getBussinessType} from "../../api/basic/bussinessType";
import {filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAllByUser} from "@/api/basic/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busLocalType"; import {getLocalJoinByUser} from "@/api/basic/busLocalType";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -570,6 +572,8 @@ export default {
status: null, status: null,
startTime: "", startTime: "",
endTime: "", endTime: "",
locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
}, },
detailQuery: { detailQuery: {
orderId: "", orderId: "",
@ -582,6 +586,7 @@ export default {
}, },
curUnitRow: null, curUnitRow: null,
storageList: [], storageList: [],
subInvList: [],
curIndex: "", curIndex: "",
adListNoDataText: "无数据", adListNoDataText: "无数据",
queryAdIdAsyncLoading: false, queryAdIdAsyncLoading: false,
@ -1063,7 +1068,7 @@ export default {
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.filterQuery.locStorageCode = this.storageList[0].code; this.invChange();
this.getList(); this.getList();
} }
}) })
@ -1223,6 +1228,18 @@ export default {
this.billAction = row.action; this.billAction = row.action;
this.addDialogVisible = true; this.addDialogVisible = true;
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.filterQuery.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
}, },
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {

@ -26,6 +26,7 @@
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true" <el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true"
@change="invChange"
size="mini"> size="mini">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
@ -36,6 +37,18 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button <el-button
@ -269,6 +282,7 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {getLocalJoinByUser} from "@/api/basic/busLocalType"; import {getLocalJoinByUser} from "@/api/basic/busLocalType";
import {filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAllByUser} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -286,7 +300,8 @@ export default {
action: null, action: null,
page: 1, page: 1,
limit: 20, limit: 20,
locStorageCode: null, locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
}, },
checkStatus: { checkStatus: {
'-1': "等待提交", '-1': "等待提交",
@ -318,6 +333,7 @@ export default {
"8": "平衡补录单据", "8": "平衡补录单据",
}, },
storageList: [], storageList: [],
subInvList: [],
list: [], list: [],
adId: [], adId: [],
adSelectList: [], adSelectList: [],
@ -545,13 +561,25 @@ export default {
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.filterQuery.locStorageCode = this.storageList[0].code; this.invChange();
this.getList(); this.getList();
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.filterQuery.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
}, },
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {

@ -3,60 +3,80 @@
<el-card class="el-card"> <el-card class="el-card">
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini"> <el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-col>
<el-input v-model="filterQuery.id" placeholder="单号"></el-input> <el-form-item class="query-form-item">
</el-form-item> <el-input v-model="filterQuery.id" placeholder="单号"></el-input>
<el-form-item class="query-form-item"> </el-form-item>
<el-select v-model="filterQuery.mainAction" placeholder="出入库类型"> <el-form-item class="query-form-item">
<el-option label="全部" value=""></el-option> <el-select v-model="filterQuery.mainAction" placeholder="出入库类型">
<el-option label="入库" value="WareHouseIn"></el-option> <el-option label="全部" value=""></el-option>
<el-option label="出库" value="WareHouseOut"></el-option> <el-option label="入库" value="WareHouseIn"></el-option>
</el-select> <el-option label="出库" value="WareHouseOut"></el-option>
</el-form-item> </el-select>
<el-form-item class="query-form-item"> </el-form-item>
<el-select v-model="filterQuery.action" placeholder="请选择扫码单据类型"> <el-form-item class="query-form-item">
<el-option <el-select v-model="filterQuery.action" placeholder="请选择扫码单据类型">
v-for="item in busTypes" <el-option
:key="item.name" v-for="item in busTypes"
:label="item.name" :key="item.name"
:value="item.action"> :label="item.name"
<span style="float: left">{{ item.name }}</span> :value="item.action">
</el-option> <span style="float: left">{{ item.name }}</span>
</el-select> </el-option>
</el-form-item> </el-select>
<el-form-item class="query-form-item"> </el-form-item>
<el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true"
size="mini">
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
</el-button-group>
</el-form-item>
<el-form-item style="margin-right: 50px; margin-left: auto">
<el-button-group>
<el-button type="primary" icon="search" @click="mergesOrders"></el-button>
<el-button type="primary" icon="search" @click="addOrders"></el-button>
<el-button type="primary" icon="search" @click="errOrders"></el-button>
</el-button-group> </el-col>
</el-form-item> <el-col>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true"
@change="invChange"
size="mini">
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
</el-button-group>
</el-form-item>
<el-form-item style="margin-right: 50px; margin-left: auto">
<el-button-group>
<el-button type="primary" icon="search" @click="mergesOrders"></el-button>
<el-button type="primary" icon="search" @click="addOrders"></el-button>
<el-button type="primary" icon="search" @click="errOrders"></el-button>
</el-button-group>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -274,6 +294,7 @@ import store from "../../store";
import {getBussinessType} from "../../api/basic/bussinessType"; import {getBussinessType} from "../../api/basic/bussinessType";
import {filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAllByUser} from "@/api/basic/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busLocalType"; import {getLocalJoinByUser} from "@/api/basic/busLocalType";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -292,7 +313,8 @@ export default {
page: 1, page: 1,
status: 10, status: 10,
limit: 10, limit: 10,
locStorageCode: null, locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
}, },
checkStatus: { checkStatus: {
'-1': "草稿", '-1': "草稿",
@ -315,6 +337,7 @@ export default {
id: "", id: "",
}, },
storageList: [], storageList: [],
subInvList: [],
errOrderVisible: false, errOrderVisible: false,
list: [], list: [],
adId: [], adId: [],
@ -419,7 +442,7 @@ export default {
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.filterQuery.locStorageCode = this.storageList[0].code; this.invChange();
this.getList(); this.getList();
} }
}) })
@ -631,6 +654,19 @@ export default {
this.idQuery.id = row.id; this.idQuery.id = row.id;
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.filterQuery.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
}, },
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {

@ -36,6 +36,7 @@
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true" <el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true"
@change="invChange"
size="mini"> size="mini">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
@ -47,6 +48,18 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px;font-size: small" <span style="color: #000; margin-left: 10px; margin-right: 6px;font-size: small"
>创建日期:</span >创建日期:</span
> >
@ -405,6 +418,7 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {formatDate} from "../../utils/date"; import {formatDate} from "../../utils/date";
import {filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAllByUser} from "@/api/basic/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busLocalType"; import {getLocalJoinByUser} from "@/api/basic/busLocalType";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -455,6 +469,7 @@ export default {
list: [], list: [],
detailList: [], detailList: [],
storageList: [], storageList: [],
subInvList: [],
unitUpdateQuery: { unitUpdateQuery: {
id: "", id: "",
fromCorpId: "", fromCorpId: "",
@ -462,7 +477,6 @@ export default {
}, },
actDateRange: [], actDateRange: [],
filterQuery: { filterQuery: {
locStorageCode: null,
id: "", id: "",
mainAction: null, mainAction: null,
action: null, action: null,
@ -474,6 +488,8 @@ export default {
status: null, status: null,
startTime: "", startTime: "",
endTime: "", endTime: "",
locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
}, },
detailQuery: { detailQuery: {
orderId: "", orderId: "",
@ -604,6 +620,7 @@ export default {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.filterQuery.locStorageCode = this.storageList[0].code; this.filterQuery.locStorageCode = this.storageList[0].code;
this.invChange();
this.getList(); this.getList();
} }
}) })
@ -790,11 +807,6 @@ export default {
}); });
}, },
intentDetail(row) { intentDetail(row) {
// this.$router.push({
// path: "../inout/detail",
// query: { id: row.id },
// });
this.codeDetailVisible = true; this.codeDetailVisible = true;
this.idQuery.id = row.id; this.idQuery.id = row.id;
}, },
@ -930,6 +942,18 @@ export default {
} }
} }
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.filterQuery.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
} }
, ,
filters: { filters: {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -93,6 +93,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="locStorageCode"> <el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" clearable <el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" clearable
@change="locCHange"
:disabled="corpOrderIdDisabled"> :disabled="corpOrderIdDisabled">
<el-option <el-option
@ -105,7 +106,31 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="2">
<div class="ao-text">
<span>当前分库</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" clearable
:disabled="corpOrderIdDisabled">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12" class="el-col"> <el-col :span="12" class="el-col">
<div class="text item"> <div class="text item">
<el-checkbox v-model="formData.codeFillCheck" <el-checkbox v-model="formData.codeFillCheck"
@ -116,7 +141,6 @@
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
<el-card> <el-card>
<el-row :gutter="20"> <el-row :gutter="20">
@ -304,6 +328,7 @@ import DialogSelectUnit from "./DialogSelectUnit";
import selectRlDialog from "./DialogSelectRl"; import selectRlDialog from "./DialogSelectRl";
import editCodeDialog from "./editCode"; import editCodeDialog from "./editCode";
import A from "../../plugin/KeyScaner" import A from "../../plugin/KeyScaner"
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
name: "idQuery", name: "idQuery",
@ -340,6 +365,7 @@ export default {
fromCorp: "医院", fromCorp: "医院",
fromType: null, fromType: null,
locStorageCode: null, locStorageCode: null,
invWarehouseCode:null,
actDate: new Date(), actDate: new Date(),
billType: null, billType: null,
preCheck: false, preCheck: false,
@ -369,6 +395,7 @@ export default {
curRow: null, curRow: null,
busTypes: [], busTypes: [],
storageList: [], storageList: [],
subInvList: [],
editOriginCodeVisible: false, editOriginCodeVisible: false,
curId: null, curId: null,
selectRlVisible: false, selectRlVisible: false,
@ -731,6 +758,26 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
findSubInvByInv(invCode) {
this.subInvList = [];
let query = {
pcode: invCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
locCHange() {
this.subInvList = [];
this.formData.invWarehouseCode = "";
this.findSubInvByInv(this.formData.locStorageCode);
},
intentBack() { intentBack() {
this.$router.go(-1); this.$router.go(-1);
}, },
@ -856,6 +903,7 @@ export default {
this.formData.customerId = store.getters.customerId; this.formData.customerId = store.getters.customerId;
this.getBusType(); this.getBusType();
this.getStorage(); this.getStorage();
this.findSubInvByInv();
if (this.$isNotBlank(this.idQuery.id)) { if (this.$isNotBlank(this.idQuery.id)) {
this.formData.actDate = new Date(this.idQuery.actDate); this.formData.actDate = new Date(this.idQuery.actDate);
this.formData.corpOrderId = this.idQuery.corpOrderId; this.formData.corpOrderId = this.idQuery.corpOrderId;

@ -171,24 +171,38 @@
</el-col> </el-col>
<el-col :span="3">
<div class="ao-text">
<span>当前分库</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前仓库信息"
clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: -10px;">
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span></span> <span></span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<!-- <el-form-item prop="type">-->
<!-- <el-select v-model="formData.type" style="width: 100%" placeholder="采购类型">-->
<!-- <el-option label="预入库" value="1"></el-option>-->
<!-- <el-option label="普通采购" value="2"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item prop="type">-->
<!-- </el-form-item>-->
<!-- <el-radio-group v-model="formData.noInvOut" style="margin-right: 20px;margin-left: 20px">-->
<!-- <el-radio-button :label="true" size="mini">允许</el-radio-button>-->
<!-- <el-radio-button :label="false" size="mini">禁用</el-radio-button>-->
<!-- </el-radio-group>-->
<el-form-item prop="type" style="margin-right: 20px;" <el-form-item prop="type" style="margin-right: 20px;"
v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType == 0)"> v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType == 0)">
<el-checkbox v-model="formData.noInvOut"></el-checkbox> <el-checkbox v-model="formData.noInvOut"></el-checkbox>
@ -196,53 +210,9 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" style="margin-top: -10px;">
</el-row>
<!-- <el-row :gutter="20" style="margin-top: -10px;">-->
<!-- <el-col :span="3">-->
<!-- <div class="ao-text">-->
<!-- <span>采购类别</span>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="7">-->
<!-- <el-form-item prop="type">-->
<!-- <el-select v-model="formData.type" style="width: 100%" placeholder="采购类型">-->
<!-- <el-option label="预入库" value="1"></el-option>-->
<!-- <el-option label="普通采购" value="2"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-card> </el-card>
<el-card> <el-card>
<!-- <el-row :gutter="20" style="padding-bottom: 10px; margin-top: -10px">-->
<!-- <el-col :span="20">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- size="small"-->
<!-- @click.native.stop="addCode()"-->
<!-- style="display: flex; height: 31px; margin-left: auto; margin-right: 0;"-->
<!-- :loading="loading"-->
<!-- >产品录入-->
<!-- </el-button-->
<!-- >-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-button-group style="display: flex">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- size="small"-->
<!-- @click.native.stop="addCode()"-->
<!-- style="margin: 0px 60px 10px auto; height: 35px"-->
<!-- :loading="loading"-->
<!-- >产品录入-->
<!-- </el-button-->
<!-- >-->
<!-- </el-button-group>-->
<el-button-group style="display: flex"> <el-button-group style="display: flex">
<el-button <el-button
type="primary" type="primary"
@ -255,47 +225,6 @@
> >
</el-button-group> </el-button-group>
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="3">-->
<!-- <div class="ao-text">-->
<!-- <span>扫码录入</span>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="10">-->
<!-- <el-form-item prop="code">-->
<!-- &lt;!&ndash; @keyup.native.enter="focusNext('iCount')" @focus="getInputFocus($event)"-->
<!-- @keypress.enter.native="selectProductFunction($event)"-->
<!-- &ndash;&gt;-->
<!-- <el-input-->
<!-- @keyup.enter.native="selectProductFunction($event)"-->
<!-- v-model="code"-->
<!-- auto-complete="off"-->
<!-- ref='inputRef'-->
<!-- @focus="getInputFocus($event)"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- &lt;!&ndash; <el-col :span="3">&ndash;&gt;-->
<!-- &lt;!&ndash; <div class="ao-text">&ndash;&gt;-->
<!-- &lt;!&ndash; <span>数量</span>&ndash;&gt;-->
<!-- &lt;!&ndash; </div>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-col :span="4">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item prop="iCount">&ndash;&gt;-->
<!-- &lt;!&ndash; &lt;!&ndash; @keypress.enter.native="addCode()"&ndash;&gt;&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="iCount" auto-complete="off" ref="iCount"&ndash;&gt;-->
<!-- &lt;!&ndash; @keypress.enter.native="iCountEnterFunction()"&ndash;&gt;-->
<!-- &lt;!&ndash; @focus="getInputFocus($event)"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="iCountChange"&ndash;&gt;-->
<!-- &lt;!&ndash; oninput="value=value.replace(/[^\d]/g,'')"></el-input>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- </el-row>-->
<!-- highlight-current-row-->
<!-- @current-change="rowChange"-->
<el-table v-loading="loading" :data="codeArray" style="width: 100%;" <el-table v-loading="loading" :data="codeArray" style="width: 100%;"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
max-height="300" height="300" ref="multipleTable"> max-height="300" height="300" ref="multipleTable">
@ -324,46 +253,22 @@
</el-table-column> </el-table-column>
<el-table-column width="180" label="生产日期(yyMMdd)"> <el-table-column width="180" label="生产日期(yyMMdd)">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-input size="small" v-model="scope.row.productDate"-->
<!-- :disabled="scope.row.index !== selectedIndex"-->
<!-- placeholder="请输入生产日期" style="width: 80%"></el-input>-->
<el-input v-model="scope.row.productDate" auto-complete="off" <el-input v-model="scope.row.productDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)" oninput="if(value.length>6)value=value.slice(0,6)"
:disabled="scope.row.index !== selectedIndex" :disabled="scope.row.index !== selectedIndex"
type="number" type="number"
></el-input> ></el-input>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- size="small" v-model="scope.row.productDate"-->
<!-- :disabled="scope.row.index !== selectedIndex"-->
<!-- placeholder="请选择生产日期" style="width: 80%"-->
<!-- value-format="yyMMdd"-->
<!-- format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="失效日期(yyMMdd)"> <el-table-column width="180" label="失效日期(yyMMdd)">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-input size="small" v-model="scope.row.expireDate"-->
<!-- :disabled="scope.row.index !== selectedIndex"-->
<!-- placeholder="请输入失效日期" style="width: 80%"></el-input>-->
<el-input v-model="scope.row.expireDate" auto-complete="off" <el-input v-model="scope.row.expireDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)" oninput="if(value.length>6)value=value.slice(0,6)"
:disabled="scope.row.index !== selectedIndex" :disabled="scope.row.index !== selectedIndex"
type="number" type="number"
></el-input> ></el-input>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- size="small" v-model="scope.row.expireDate"-->
<!-- :disabled="scope.row.index !== selectedIndex"-->
<!-- placeholder="请选择失效日期" style="width: 80%"-->
<!-- value-format="yyMMdd"-->
<!-- format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" label="单据数量"> <el-table-column width="150" label="单据数量">
@ -376,16 +281,6 @@
oninput="value=value.replace(/[^\d]/g,'')"></el-input> oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column width="150" label="实际数量">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input size="small" v-model="scope.row.reCount"-->
<!-- placeholder="请输入数量" style="width: 80%"-->
<!-- type='number'-->
<!-- @change="tableCountChange(scope.row)"-->
<!-- :disabled="scope.row.index !== selectedIndex"-->
<!-- oninput="value=value.replace(/[^\d]/g,'')"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column width="150" label="价格"> <el-table-column width="150" label="价格">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input size="small" v-model="scope.row.price" <el-input size="small" v-model="scope.row.price"
@ -396,11 +291,6 @@
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column width="150"-->
<!--label="单据数量"-->
<!--prop="count"-->
<!--show-overflow-tooltip-->
<!--&gt;</el-table-column>-->
<el-table-column width="150" <el-table-column width="150"
label="注册/备案凭证号" label="注册/备案凭证号"
prop="zczbhhzbapzbh" prop="zczbhhzbapzbh"
@ -424,16 +314,6 @@
>编辑 >编辑
</el-button </el-button
> >
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- v-if="orderEditor && scope.row.index === selectedIndex"-->
<!-- :disabled="scope.row.index !== selectedIndex"-->
<!-- @click.stop="true"-->
<!-- @click.native="saveCodeArray(scope.$index, scope.row)"-->
<!-- >保存-->
<!-- </el-button-->
<!-- >-->
<el-button <el-button
type="text" type="text"
size="small" size="small"
@ -521,6 +401,7 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType"; import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse";
import dialogInvProduct from "../inventory/DialogInvProduct" import dialogInvProduct from "../inventory/DialogInvProduct"
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
name: "idQuery", name: "idQuery",
@ -560,9 +441,6 @@ export default {
locStorageCode: [ locStorageCode: [
{required: true, message: "请选择当前仓库", trigger: "blur"} {required: true, message: "请选择当前仓库", trigger: "blur"}
], ],
// type: [
// {required: true, message: "", trigger: "blur"}
// ],
}, },
codeArray: [], codeArray: [],
fromOptions: [], fromOptions: [],
@ -606,6 +484,7 @@ export default {
thisData: {}, thisData: {},
storageList: [], storageList: [],
invQueryData: {}, invQueryData: {},
subInvList: [],
}; };
}, },
components: { components: {
@ -714,6 +593,7 @@ export default {
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
this.invChange();
}) })
.catch(() => { .catch(() => {
}); });
@ -1296,8 +1176,21 @@ export default {
this.formData.locStorageCode = item; this.formData.locStorageCode = item;
this.$forceUpdate(); this.$forceUpdate();
this.getBusType(item); this.getBusType(item);
this.invChange();
this.findStorageMethod(); this.findStorageMethod();
} },
invChange() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
}, },
filters: {}, filters: {},
mounted() { mounted() {

@ -28,7 +28,9 @@
<el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input> <el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="query.locStorageCode" placeholder="请选择当前仓库" clearable="true" size="mini"> <el-select v-model="query.locStorageCode"
@change="invChange"
placeholder="请选择当前仓库" clearable="true" size="mini">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
:key="item.name" :key="item.name"
@ -38,6 +40,18 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span> <span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker <el-date-picker
@ -368,6 +382,7 @@ import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile}
import store from "../../store"; import store from "../../store";
import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType"; import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
name: "stockOrder", name: "stockOrder",
@ -376,7 +391,8 @@ export default {
query: { query: {
billType: null, billType: null,
corpName: null, corpName: null,
locStorageCode: null, locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
billNo: "", billNo: "",
status: "3", status: "3",
page: 1, page: 1,
@ -391,6 +407,7 @@ export default {
}, },
isSp: store.getters.customerId, isSp: store.getters.customerId,
storageList: [], storageList: [],
subInvList: [],
busTypes: [], busTypes: [],
list: [], list: [],
detailList: [], detailList: [],
@ -772,13 +789,26 @@ export default {
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code; this.invChange();
this.getList(); this.getList();
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.query.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
submitUploadDetail() { submitUploadDetail() {
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {

@ -28,7 +28,9 @@
<el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input> <el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="query.locStorageCode" placeholder="请选择当前仓库" clearable="true" size="mini"> <el-select v-model="query.locStorageCode"
@change="invChange"
placeholder="请选择当前仓库" clearable="true" size="mini">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
:key="item.name" :key="item.name"
@ -38,6 +40,18 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span> <span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker <el-date-picker
@ -329,6 +343,7 @@ import store from "../../store";
import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType"; import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse";
import StockOrderEdit from "@/views/warehouse/stockOrderEdit"; import StockOrderEdit from "@/views/warehouse/stockOrderEdit";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
name: "stockOrderDelSearch", name: "stockOrderDelSearch",
@ -337,7 +352,8 @@ export default {
query: { query: {
billType: null, billType: null,
corpName: null, corpName: null,
locStorageCode: null, locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
startTime: "", startTime: "",
endTime: "", endTime: "",
billNo: "", billNo: "",
@ -368,6 +384,7 @@ export default {
total: 0, total: 0,
detailTotal: 0, detailTotal: 0,
storageList: [], storageList: [],
subInvList: [],
loading: false, loading: false,
detailLoading: false, detailLoading: false,
idQuery: { idQuery: {
@ -826,13 +843,26 @@ export default {
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code; this.invChange();
this.getList(); this.getList();
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.query.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
supplementOrder(row) { supplementOrder(row) {
this.$confirm('是否确认补单?', '提示', { this.$confirm('是否确认补单?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',

File diff suppressed because it is too large Load Diff

@ -27,7 +27,9 @@
<el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input> <el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="query.locStorageCode" placeholder="请选择当前仓库" clearable="true" size="mini"> <el-select v-model="query.locStorageCode"
placeholder="请选择当前仓库" clearable="true" size="mini"
@change="invChange">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
:key="item.name" :key="item.name"
@ -37,6 +39,20 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span> <span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker <el-date-picker
@ -450,6 +466,7 @@ import draggable from "vuedraggable";
import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType"; import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {selectSysParamByKey} from "../../api/param/systemParamConfig"; import {selectSysParamByKey} from "../../api/param/systemParamConfig";
import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
name: "stockOrder", name: "stockOrder",
@ -458,7 +475,8 @@ export default {
query: { query: {
billType: null, billType: null,
corpName: null, corpName: null,
locStorageCode: null, locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
billNo: "", billNo: "",
status: "1", status: "1",
page: 1, page: 1,
@ -479,6 +497,7 @@ export default {
detailLoading: false, detailLoading: false,
formData: {}, formData: {},
storageList: [], storageList: [],
subInvList: [],
statusMap: { statusMap: {
"1": "草稿", "1": "草稿",
"2": "未配货", "2": "未配货",
@ -896,13 +915,26 @@ export default {
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code; this.invChange();
this.getList(); this.getList();
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.query.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
}, },
components: { components: {
draggable, draggable,

@ -94,24 +94,6 @@
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="corpName"> <el-form-item prop="corpName">
<el-input v-model="formData.corpName" auto-complete="off" :disabled="true"></el-input> <el-input v-model="formData.corpName" auto-complete="off" :disabled="true"></el-input>
<!-- <el-select-->
<!-- style="width: 100%"-->
<!-- v-model="sValue"-->
<!-- :multiple="false"-->
<!-- filterable-->
<!-- remote-->
<!-- reserve-keyword-->
<!-- placeholder="请输入供应商名称"-->
<!-- :remote-method="remoteMethod"-->
<!-- :loading="sLoading"-->
<!-- @change="selectOne">-->
<!-- <el-option-->
<!-- v-for="item in sOptions"-->
<!-- :key="idx"-->
<!-- :label="item.name"-->
<!-- :value="item">-->
<!-- </el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -127,11 +109,8 @@
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="locStorageCode"> <el-form-item prop="locStorageCode">
<!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">-->
<!--<el-option label="送货单" value="deliveryNote"></el-option>-->
<!--</el-select>-->
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" clearable <el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" clearable
@change="getBusType"> @change="locInChange">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
:key="item.name" :key="item.name"
@ -142,6 +121,28 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3">
<div class="ao-text">
<span>当前分库</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前仓库信息"
clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
@ -453,6 +454,7 @@ import dialogInvProduct from "../inventory/DialogInvProduct"
import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain"; import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain";
import {getBussinessType} from "../../api/basic/bussinessType"; import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType"; import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
name: "idQuery", name: "idQuery",
@ -527,6 +529,7 @@ export default {
sLoading: false, sLoading: false,
busTypes: [], busTypes: [],
storageList: [], storageList: [],
subInvList: [],
currentRow: {}, currentRow: {},
selectedIndex: "", selectedIndex: "",
selectProductVisible: false, selectProductVisible: false,
@ -1067,23 +1070,13 @@ export default {
intentBack() { intentBack() {
this.$router.go(-1); this.$router.go(-1);
}, },
// generateBillNo() {
// let tQuery = { locInChange(item){
// action: this.formData.billType this.formData.locStorageCode = item;
// } // this.getBusType();
// this.loading = true; this.invChange();
// stockOrderGenerateBillNo(tQuery) },
// .then((response) => {
// this.loading = false;
// if (response.code === 20000) {
// this.formData.billNo = response.data;
// // this.formData.billdate = parseTime(new Date(), '{y}{m}{d}');
// this.formData.billdate = new Date();
// } else {
// this.closeDialog(true);
// }
// });
// },
getBusType() { getBusType() {
let query = { let query = {
enabled: true, enabled: true,
@ -1125,6 +1118,18 @@ export default {
} }
} }
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
}, },
filters: {}, filters: {},
mounted() { mounted() {

@ -28,7 +28,9 @@
<el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input> <el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="query.locStorageCode" placeholder="请选择当前仓库" clearable="true" size="mini"> <el-select v-model="query.locStorageCode"
@change="invChange"
placeholder="请选择当前仓库" clearable="true" size="mini">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
:key="item.name" :key="item.name"
@ -38,6 +40,18 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span> <span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker <el-date-picker
@ -456,6 +470,7 @@ import store from "../../store";
import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType"; import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse";
import StockOrderEdit from "@/views/warehouse/stockOrderEdit"; import StockOrderEdit from "@/views/warehouse/stockOrderEdit";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
name: "stockOrderSearch", name: "stockOrderSearch",
@ -464,7 +479,8 @@ export default {
query: { query: {
billType: null, billType: null,
corpName: null, corpName: null,
locStorageCode: null, locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
startTime: "", startTime: "",
endTime: "", endTime: "",
billNo: "", billNo: "",
@ -493,6 +509,7 @@ export default {
secSalesInvNoFormVisible: false, secSalesInvNoFormVisible: false,
formLabelWidth: '150px', formLabelWidth: '150px',
storageList: [], storageList: [],
subInvList: [],
total: 0, total: 0,
detailTotal: 0, detailTotal: 0,
loading: false, loading: false,
@ -914,13 +931,27 @@ export default {
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code; this.invChange();
this.getList(); this.getList();
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.query.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
submitUploadDetail() { submitUploadDetail() {
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {

@ -28,7 +28,9 @@
<el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input> <el-input v-model="query.corpName" placeholder="往来单位" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="query.locStorageCode" placeholder="请选择当前仓库" clearable="true" size="mini"> <el-select v-model="query.locStorageCode"
@change="invChange"
placeholder="请选择当前仓库" clearable="true" size="mini">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
:key="item.name" :key="item.name"
@ -38,6 +40,18 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span> <span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker <el-date-picker
@ -341,6 +355,7 @@ import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile}
import store from "../../store"; import store from "../../store";
import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType"; import {getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default { export default {
name: "stockOrderWaitCheck", name: "stockOrderWaitCheck",
@ -349,7 +364,8 @@ export default {
query: { query: {
billType: null, billType: null,
corpName: null, corpName: null,
locStorageCode: null, locStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: this.$store.getters.locSubInvCode,
billNo: "", billNo: "",
status: "3", status: "3",
page: 1, page: 1,
@ -367,6 +383,7 @@ export default {
detailList: [], detailList: [],
total: 0, total: 0,
storageList: [], storageList: [],
subInvList: [],
detailTotal: 0, detailTotal: 0,
loading: false, loading: false,
detailLoading: false, detailLoading: false,
@ -764,12 +781,25 @@ export default {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code; this.query.locStorageCode = this.storageList[0].code;
this.invChange();
this.getList(); this.getList();
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
invChange() {
this.subInvList = [];
let query = {
pcode: this.query.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
},
submitUploadDetail() { submitUploadDetail() {
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {

Loading…
Cancel
Save