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

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) {
return axios({
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) {
return axios({
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) {
return axios({
url: "/spms/inv/pre/product/filterDetail",

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

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

@ -9,7 +9,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="领用仓库:">
<el-form-item label="当前仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 100%;">
<el-option
v-for="item in invList"
@ -21,23 +21,39 @@
</el-form-item>
</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 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-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-form-item label="领用类型:">-->
<!-- <el-select v-model="filterQuery.billType" style="width: 90%" placeholder="请选择领用类型" clearable="true">-->
@ -55,24 +71,7 @@
<!-- </el-form-item>-->
<!-- </el-col>-->
</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>
<div class="top-right-btn">
@ -90,8 +89,8 @@
<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="deptName"></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="invName"></el-table-column>
<!--<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>-->
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status)">
@ -165,7 +164,7 @@ export default {
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
corpName: this.$store.getters.locInvName,
invCode: '',
type: 2,
editStatus: 2,

Loading…
Cancel
Save