新增领用过滤零库存和负库存 保存时判断库存

dev
wangwei 2 years ago
parent 140720d4e7
commit 0a08c9ebbe

@ -8,6 +8,14 @@ export function getInvProduct(params) {
}); });
} }
export function getInvProductStock(params) {
return axios({
url: "/spms/inv/product/filterStock",
method: "get",
params: params
});
}
export function getProduct(params) { export function getProduct(params) {
return axios({ return axios({
url: "/spms/inv/product/filterProduct", url: "/spms/inv/product/filterProduct",

@ -34,6 +34,14 @@ export function getInvPreInProduct(params) {
}); });
} }
export function getInvPreInProductStock(params) {
return axios({
url: "/spms/inv/pre/in/product/filterStock",
method: "get",
params: params
});
}
export function getInvPreInProductDetail(params) { export function getInvPreInProductDetail(params) {
return axios({ return axios({
url: "/spms/inv/pre/in/product/filterDetail", url: "/spms/inv/pre/in/product/filterDetail",

@ -8,6 +8,16 @@ export function getInvPreProduct(params) {
}); });
} }
export function getInvPreProductStock(params) {
return axios({
url: "/spms/inv/pre/product/filterStock",
method: "get",
params: params
});
}
export function getInvPreProductDetail(params) { export function getInvPreProductDetail(params) {
return axios({ return axios({
url: "/spms/inv/pre/product/filterDetail", url: "/spms/inv/pre/product/filterDetail",

@ -66,12 +66,12 @@
<script> <script>
import { import {
getInvProduct, getInvProduct, getInvProductStock,
} from "@/api/inventory/invPorduct"; } from "@/api/inventory/invPorduct";
import {addDetail} from "@/api/inout/receiveOrder"; import {addDetail} from "@/api/inout/receiveOrder";
import {addBizProduct} from "@/api/inout/orderDetailCode"; import {addBizProduct} from "@/api/inout/orderDetailCode";
import {getInvPreInProduct} from "@/api/inventory/invPreInSearch"; import {getInvPreInProduct, getInvPreInProductStock} from "@/api/inventory/invPreInSearch";
import {getInvPreProduct} from "@/api/inventory/invPreProduct"; import {getInvPreProduct, getInvPreProductStock} from "@/api/inventory/invPreProduct";
export default { export default {
@ -172,7 +172,7 @@ export default {
this.loading = true; this.loading = true;
// //
if(this.invQueryData.advanceType==3){ if(this.invQueryData.advanceType==3){
getInvPreProduct(this.filterQuery) getInvPreProductStock(this.filterQuery)
.then((response) => { .then((response) => {
this.showSup = response.data.showSup; this.showSup = response.data.showSup;
this.loading = false; this.loading = false;
@ -186,7 +186,7 @@ export default {
}); });
// //
}else if(this.invQueryData.advanceType==2){ }else if(this.invQueryData.advanceType==2){
getInvPreInProduct(this.filterQuery) getInvPreInProductStock(this.filterQuery)
.then((response) => { .then((response) => {
this.showSup = response.data.showSup; this.showSup = response.data.showSup;
this.loading = false; this.loading = false;
@ -200,7 +200,7 @@ export default {
}); });
}else{ }else{
getInvProduct(this.filterQuery) getInvProductStock(this.filterQuery)
.then((response) => { .then((response) => {
this.showSup = response.data.showSup; this.showSup = response.data.showSup;
this.loading = false; this.loading = false;

@ -44,9 +44,10 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="invCode" label="领用仓库:"> <el-form-item prop="invCode" label="当前仓库:">
<el-select v-model="formData.invCode" @change="subStorageChange" placeholder="当前仓库信息" <el-select v-model="formData.invCode" @change="subStorageChange" placeholder="当前仓库信息"
style="width: 100%;" style="width: 100%;"
:disabled="codeArray.length>0"
clearable> clearable>
<el-option <el-option
v-for="item in invList" v-for="item in invList"
@ -58,9 +59,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="query-form-item" prop="targetInvCode" label="往来信息:"> <el-form-item class="query-form-item" prop="targetInvCode" label="领用仓库:">
<el-select v-model="formData.targetInvCode" placeholder="请选择往来信息" @change="getTargerType" <el-select v-model="formData.targetInvCode" placeholder="请选择领用仓库" @change="getTargerType"
clearable="true" clearable="true"
:disabled="codeArray.length>0"
style="width: 100%" style="width: 100%"
> >
<el-option <el-option
@ -138,6 +140,9 @@
<el-table-column label="供应商" prop="supName"></el-table-column> <el-table-column label="供应商" prop="supName"></el-table-column>
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" :disabled="!ischeck" @click.stop="true"
@click.native="save(scope.row)">保存
</el-button>
<el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true" <el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true"
@click.native="rowChange(scope.row)">编辑 @click.native="rowChange(scope.row)">编辑
</el-button> </el-button>
@ -259,7 +264,8 @@ export default {
storageList: [], storageList: [],
invQueryData: {}, invQueryData: {},
type: 1, type: 1,
Receive: {},
ischeck:false,
}; };
}, },
components: { components: {
@ -410,16 +416,11 @@ export default {
this.getOrderDetailList(); this.getOrderDetailList();
}, },
rowChange(val) { save(){
this.currentRow = val; if (this.$isNotBlank(this.Receive)) {
this.selectedIndex = val.index; this.Receive.targetInvCode = this.formData.targetInvCode
this.iCount = val.count; this.Receive.advanceType = this.formData.advanceType
this.focusNext('iCount'); updateReceiveDetail(this.Receive).then(res => {
},
tableCountChange(row) {
if (this.$isNotBlank(row)) {
updateReceiveDetail(row).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.loading = false; this.loading = false;
} else { } else {
@ -429,6 +430,16 @@ export default {
}) })
} }
}, },
rowChange(val) {
this.ischeck = true;
this.currentRow = val;
this.selectedIndex = val.index;
this.iCount = val.count;
this.focusNext('iCount');
},
tableCountChange(row) {
this.Receive = row;
},
tableRowClassName({row, rowIndex}) { tableRowClassName({row, rowIndex}) {
row.index = rowIndex; row.index = rowIndex;
}, },

@ -9,7 +9,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="领用仓库:"> <el-form-item label="当前仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 100%;"> <el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 100%;">
<el-option <el-option
v-for="item in invList" v-for="item in invList"
@ -21,23 +21,39 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="往来信息:"> <el-form-item label="创建时间:">
<el-select v-model="filterQuery.corpName" placeholder="请输入往来信息" <el-date-picker
filterable style="width: 90%"
remote :picker-options="pickerOptions"
reserve-keyword v-model="actDateRange"
:remote-method="finCorpList" type="daterange"
:loading="loading" format="yyyy 年 MM 月 dd 日"
style="width: 100%;"> value-format="yyyy-MM-dd"
<el-option range-separator="至"
v-for="item in corpList" start-placeholder="开始日期"
:key="item.code" end-placeholder="结束日期"
:label="item.name" >
:value="item.name"> </el-date-picker>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!--<el-col :span="8">-->
<!-- <el-form-item label="往来信息:">-->
<!-- <el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"-->
<!-- filterable-->
<!-- remote-->
<!-- reserve-keyword-->
<!-- :remote-method="finCorpList"-->
<!-- :loading="loading"-->
<!-- style="width: 100%;">-->
<!-- <el-option-->
<!-- v-for="item in corpList"-->
<!-- :key="item.code"-->
<!-- :label="item.name"-->
<!-- :value="item.name">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!--</el-col>-->
<!-- <el-col :span="6">--> <!-- <el-col :span="6">-->
<!-- <el-form-item label="领用类型:">--> <!-- <el-form-item label="领用类型:">-->
<!-- <el-select v-model="filterQuery.billType" style="width: 90%" placeholder="请选择领用类型" clearable="true">--> <!-- <el-select v-model="filterQuery.billType" style="width: 90%" placeholder="请选择领用类型" clearable="true">-->
@ -55,24 +71,7 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
</el-row> </el-row>
<el-row>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker
style="width: 90%"
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
@ -90,8 +89,8 @@
<el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="领用单号" prop="billNo"></el-table-column> <el-table-column label="领用单号" prop="billNo"></el-table-column>
<el-table-column label="领用部门" prop="deptName"></el-table-column> <el-table-column label="领用部门" prop="deptName"></el-table-column>
<el-table-column label="领用仓库" prop="invName"></el-table-column> <el-table-column label="当前仓库" prop="invName"></el-table-column>
<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column> <!--<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>-->
<el-table-column label="单据状态" prop="status"> <el-table-column label="单据状态" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.status)"> <el-tag :type="(scope.row.status)">
@ -165,7 +164,7 @@ export default {
thirdSysFk: "", thirdSysFk: "",
page: 1, page: 1,
limit: 10, limit: 10,
corpName: null, corpName: this.$store.getters.locInvName,
invCode: '', invCode: '',
type: 2, type: 2,
editStatus: 2, editStatus: 2,

Loading…
Cancel
Save