1.修复盘点功能bug

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

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

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

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

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

Loading…
Cancel
Save