1.修复盘点功能bug

feature-order-fix
x_z 3 years ago
parent 507aa3f202
commit 637f91325a

@ -156,8 +156,12 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="14" style="margin-left: 40px"> <el-col :span="11" style="margin-left: 40px">
</el-col>
<el-col :span="3">
<div class="text item" style="margin-left: 30px"> 盘点产品数量{{ codeArray.length }}
</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="text item" style="margin-left: 30px"> 条码数量{{ codesNum }} <div class="text item" style="margin-left: 30px"> 条码数量{{ codesNum }}
@ -238,7 +242,7 @@
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getInvProducts" <el-button type="primary" icon="search" @click="queryInvProducts"
>查询 >查询
</el-button </el-button
> >
@ -355,6 +359,7 @@ export default {
filterQuery: { filterQuery: {
invStorageCode: null, invStorageCode: null,
invWarehouseCode: null, invWarehouseCode: null,
invSpaceCode: null,
nameCode: null, nameCode: null,
cpmctymc: null, cpmctymc: null,
batchNo: null, batchNo: null,
@ -365,9 +370,7 @@ export default {
scanText: "扫码录入:", scanText: "扫码录入:",
codesList: [], codesList: [],
detailQuery: { detailQuery: {
orderIdFk: null, orderIdFk: null
page: 1,
limit: 10
}, },
detailTotal: 0, detailTotal: 0,
countProductList: [], countProductList: [],
@ -442,6 +445,7 @@ export default {
}, },
subStorageChange() { subStorageChange() {
this.formData.invSpaceCode = null; this.formData.invSpaceCode = null;
this.spaceList = [];
// //
this.getInvSpaceList(); this.getInvSpaceList();
}, },
@ -458,13 +462,21 @@ export default {
invSpaceChange() { invSpaceChange() {
this.$forceUpdate(); this.$forceUpdate();
}, },
queryInvProducts() {
this.filterQuery.page = 1;
this.getInvProducts();
},
getInvProducts() { getInvProducts() {
this.filterQuery.invStorageCode = this.formData.invStorageCode; this.filterQuery.invStorageCode = this.formData.invStorageCode;
this.filterQuery.invWarehouseCode = this.formData.invWarehouseCode; this.filterQuery.invWarehouseCode = this.formData.invWarehouseCode;
filterProducts(this.filterQuery).then((res) => { this.filterQuery.invSpaceCode = this.formData.invSpaceCode;
getCountInvProductProduct(this.filterQuery).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
this.productList = res.data.list || []; this.productList = res.data.list || [];
this.total = res.data.total || 0; this.total = res.data.total || 0;
} else {
this.productList = [];
this.total = 0;
} }
}) })
}, },
@ -601,7 +613,7 @@ export default {
}; };
getCountInvProductProduct(params).then((res) => { getCountInvProductProduct(params).then((res) => {
if (res.data.length !== 0) { if (res.data.length !== 0) {
let invProductList = res.data; let invProductList = res.data.list;
for (let product of invProductList) { for (let product of invProductList) {
this.countProductList.push(product); this.countProductList.push(product);
} }
@ -618,10 +630,9 @@ export default {
invWarehouseCode: this.formData.invWarehouseCode, invWarehouseCode: this.formData.invWarehouseCode,
invSpaceCode: this.formData.invSpaceCode invSpaceCode: this.formData.invSpaceCode
}; };
console.log(params)
getCountInvProductProduct(params).then((res) => { getCountInvProductProduct(params).then((res) => {
if (res.data.length !== 0) { if (res.data.length !== 0) {
let invProductList = res.data; let invProductList = res.data.list;
for (let product of invProductList) { for (let product of invProductList) {
this.countProductList.push(product); this.countProductList.push(product);
} }
@ -634,6 +645,7 @@ export default {
return; return;
} }
this.selectInvProductVisible = true; this.selectInvProductVisible = true;
this.queryInvProducts();
} }
}, },
}, },

@ -222,7 +222,8 @@ export default {
}, },
countStatusMap: { countStatusMap: {
0: '亏损', 0: '亏损',
1: '盈利' 1: '盈利',
2: "平衡"
}, },
codeQuery: { codeQuery: {
orderIdFk: null, orderIdFk: null,
@ -394,7 +395,10 @@ export default {
confirmButtonText: '通过', confirmButtonText: '通过',
cancelButtonText: '驳回', cancelButtonText: '驳回',
type: 'warning', type: 'warning',
center: true center: true,
closeOnPressEscape:false,// ESC
closeOnClickModal:false,//
distinguishCancelAndClose:true,//
}).then(() => { }).then(() => {
params.status = 2; // params.status = 2; //
updateCountOrderStatus(params).then((res) => { updateCountOrderStatus(params).then((res) => {
@ -407,21 +411,26 @@ export default {
} }
}).catch(() => { }).catch(() => {
}); });
}).catch(() => { }).catch((action) => {
params.status = 0; // if (action === 'cancel') {
updateCountOrderStatus(params).then((res) => { //
if (res.code === 20000) { params.status = 0; //
this.$message.success("审核通过"); updateCountOrderStatus(params).then((res) => {
this.$message.success("已驳回"); if (res.code === 20000) {
this.getList(); this.$message.success("审核通过");
this.onRestDetail(); this.$message.success("已驳回");
} else { this.getList();
this.$message.error(res.data.message); this.onRestDetail();
} } else {
}).catch(() => { this.$message.error(res.message);
}); }
}).catch(() => {
});
} else {
//
return;
}
}); });
}, },
}, },
components: { components: {

@ -195,7 +195,8 @@ export default {
}, },
countStatusMap: { countStatusMap: {
0: '亏损', 0: '亏损',
1: '盈利' 1: '盈利',
2: "平衡"
}, },
codeQuery: { codeQuery: {
orderIdFk: null, orderIdFk: null,

@ -18,6 +18,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.invWarehouseCode" placeholder="请选择当前分库" clearable="true" <el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
@change="subInvChange"
:disabled="invWarehouseDisabled" :disabled="invWarehouseDisabled"
size="mini"> size="mini">
<el-option <el-option
@ -150,6 +151,7 @@ import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {userInfo} from "@/api/auth/login"; import {userInfo} from "@/api/auth/login";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import addCountOrder from "./addCountOrder"; import addCountOrder from "./addCountOrder";
import {getSpaceCodeList} from "@/api/inventory/invSpace";
export default { export default {
data() { data() {
@ -280,6 +282,17 @@ export default {
this.invWarehouseDisabled = true; this.invWarehouseDisabled = true;
} }
}, },
subInvChange() {
this.filterQuery.invSpaceCode = "";
this.spaceCodeList = [];
let params = {
invStorageCode: this.filterQuery.invStorageCode,
invWarehouseCode: this.filterQuery.invWarehouseCode
}
getSpaceCodeList(params).then((res) => {
this.spaceCodeList = res.data || [];
});
},
submitAudit(row) { submitAudit(row) {
let params = {id: row.id}; let params = {id: row.id};
submitAudit(params).then((res) => { submitAudit(params).then((res) => {

Loading…
Cancel
Save