1.提交盘点功能相关页面,修改盘点接口地址
parent
cf4ad83448
commit
22a296c6b9
@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :model="query" class="query-form" size="mini" :inline="true">
|
||||
<el-form-item class="query-form-item" label="条码:">
|
||||
<el-input v-model="query.code" placeholder="请扫描或输入条码" clearable="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group style="margin-left: 10px;display:flex;">
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="codeArray" style="width: 100%" highlight-current-row
|
||||
border>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="条码" prop="code" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="扫码数量" prop="count"></el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteCountCode(scope.row.id)"
|
||||
>减一
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:limit.sync="query.limit"
|
||||
:page.sync="query.page"
|
||||
@pagination="getCodeList"
|
||||
></pagination>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCountCodesList, deleteCode} from "@/api/inventory/invCountCodes";
|
||||
|
||||
export default {
|
||||
name: "InvCountCodes",
|
||||
props: {
|
||||
countQuery: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
getCountOrderDetail: {
|
||||
type: Function,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
code: null,
|
||||
productId: null,
|
||||
orderIdFk: null,
|
||||
batchNo: null,
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
loading: true,
|
||||
codeArray: [],
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.query = {
|
||||
code: null,
|
||||
productId: null,
|
||||
orderIdFk: null,
|
||||
batchNo: null,
|
||||
page: 1,
|
||||
limit: 20
|
||||
};
|
||||
this.getCodeList();
|
||||
},
|
||||
onSubmit() {
|
||||
this.query.page = 1;
|
||||
this.getCodeList();
|
||||
},
|
||||
getCodeList() {
|
||||
this.loading = true;
|
||||
this.query.relId = this.codeQuery.relId;
|
||||
this.query.orderIdFk = this.codeQuery.orderIdFk;
|
||||
this.query.batchNo = this.codeQuery.batchNo;
|
||||
getCountCodesList(this.query).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code === 20000) {
|
||||
this.codeArray = res.data.list || [];
|
||||
this.total = res.data.total || 0;
|
||||
} else {
|
||||
this.codeArray = [];
|
||||
this.total = 0;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.codeArray = [];
|
||||
this.total = 0;
|
||||
})
|
||||
},
|
||||
deleteCountCode(row) {
|
||||
this.$confirm('是否删除此条码?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let params = {
|
||||
orderIdFk: row.orderIdFk,
|
||||
relId: row.relId,
|
||||
code: row.code
|
||||
};
|
||||
deleteCode(params).then((res) => {
|
||||
if (res.code === 20000) {
|
||||
this.$message.success("删除成功!");
|
||||
this.getCodeList();
|
||||
this.getCountOrderDetail();
|
||||
} else {
|
||||
this.$message.error(res.data.message);
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getCodeList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -0,0 +1,401 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :model="filterQuery" class="query-form" size="mini" :inline="true">
|
||||
<el-form-item class="query-form-item" label="盘点单号:">
|
||||
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号"
|
||||
clearable="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item" label="领用仓库:">
|
||||
<el-select v-model="filterQuery.invCode" placeholder="请选择仓库" clearable="true"
|
||||
@change="invChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in invList"
|
||||
: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" label="领用货位:">
|
||||
<el-select v-model="filterQuery.invSpaceCode" placeholder="请选择货位" clearable="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in spaceList"
|
||||
: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 style="margin-left: 10px;display:flex;">
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
|
||||
@current-change="handleChange"
|
||||
border>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="盘点单号" prop="orderId" width="300"></el-table-column>
|
||||
<el-table-column label="仓库" prop="invName" width="300"></el-table-column>
|
||||
<el-table-column label="货位" prop="invSpaceName" width="300"></el-table-column>
|
||||
<el-table-column label="盘点类型" prop="countType" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ countTypeMap[scope.row.countType] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盘点人" prop="createUserName" width="200"></el-table-column>
|
||||
<el-table-column label="盘点时间" prop="createTime"></el-table-column>
|
||||
<el-table-column label="状态" prop="status" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="auditCountOrder(scope.row)"
|
||||
>审核
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteDialog(scope.row.id)"
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:limit.sync="filterQuery.limit"
|
||||
:page.sync="filterQuery.page"
|
||||
@pagination="getList"
|
||||
></pagination>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
|
||||
border>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="产品名称" prop="productName" width="220"></el-table-column>
|
||||
<el-table-column label="批次号" prop="batchNo" width="180"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="生产日期" prop="produceDate" width="120"></el-table-column>
|
||||
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
|
||||
<el-table-column label="盘点数量" prop="countNum" width="150"></el-table-column>
|
||||
<el-table-column label="账面数量" prop="invNum" width="150"></el-table-column>
|
||||
<el-table-column label="盘盈数量" prop="profitNum" width="150"></el-table-column>
|
||||
<el-table-column label="盘亏数量" prop="lossNum" width="150"></el-table-column>
|
||||
<el-table-column label="盈亏状态" prop="status" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag>
|
||||
{{ countStatusMap[scope.row.status] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="showCode(scope.row)"
|
||||
>详情
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:limit.sync="detailQuery.limit"
|
||||
:page.sync="detailQuery.page"
|
||||
@pagination="getList"
|
||||
></pagination>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="码详情"
|
||||
:visible.sync="codesVisible"
|
||||
width="60%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
v-if="codesVisible"
|
||||
append-to-body
|
||||
>
|
||||
<invCountCodes
|
||||
:codeQuery="codeQuery"
|
||||
></invCountCodes>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||
import {getInvSpaceList} from "@/api/inventory/invSpace";
|
||||
import {
|
||||
getCountOrderList,
|
||||
deleteCountOrder,
|
||||
updateCountOrderStatus, getCountOrderDetailList
|
||||
} from "@/api/inventory/invCountOrder";
|
||||
import invCountCodes from "@/views/inventory/InvCountCodes.vue";
|
||||
|
||||
export default {
|
||||
name: "InvCountOrderAudit",
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
orderId: null,
|
||||
invCode: this.$store.getters.locInvCode,
|
||||
invSpaceCode: null,
|
||||
status: 1,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
list: [],
|
||||
total: 0,
|
||||
invList: [],
|
||||
spaceList: [],
|
||||
loading: false,
|
||||
formVisible: false,
|
||||
statusMap: {
|
||||
0: "草稿",
|
||||
1: "未审核",
|
||||
2: "已审核"
|
||||
},
|
||||
countOrder: {},
|
||||
countType: null,
|
||||
countTypeMap: {
|
||||
0: "整库盘点",
|
||||
1: "货位盘点",
|
||||
2: "部分盘点"
|
||||
},
|
||||
countStatusMap: {
|
||||
0: '亏损',
|
||||
1: '盈利',
|
||||
2: "平衡"
|
||||
},
|
||||
detailQuery: {
|
||||
orderIdFk: null,
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
detailList: [],
|
||||
detailTotal: 0,
|
||||
detailLoading: false,
|
||||
codeQuery: {
|
||||
orderIdFk: null,
|
||||
relId: null,
|
||||
batchNo: null,
|
||||
edit: false
|
||||
},
|
||||
codesVisible: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
orderId: null,
|
||||
invCode: this.$store.getters.locInvCode,
|
||||
invSpaceCode: null,
|
||||
status: 1,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.spaceList = [];
|
||||
this.getList();
|
||||
},
|
||||
onSubmit() {
|
||||
this.filterQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getCountOrderList(this.filterQuery).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code === 20000) {
|
||||
this.list = res.data.list || [];
|
||||
this.total = res.data.total || 0;
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$message.error(error.message);
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
})
|
||||
},
|
||||
invChange() {
|
||||
this.spaceList = [];
|
||||
this.filterQuery.fromInvSpaceCode = null;
|
||||
this.getSpaceList();
|
||||
},
|
||||
getInvList() {
|
||||
getInvListByUser()
|
||||
.then((response) => {
|
||||
this.invList = response.data || [];
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
getSpaceList() {
|
||||
let params = {invWarehouseCode: this.filterQuery.invCode};
|
||||
getInvSpaceList(params).then((res) => {
|
||||
this.spaceList = res.data.list || [];
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
addCountOrder(type) {
|
||||
this.formVisible = true;
|
||||
this.formName = 'add_' + type;
|
||||
this.countOrder = {};
|
||||
this.countType = type;
|
||||
},
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm('此操作将永久删除该盘点单, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let params = {id: rowId};
|
||||
this.loading = true;
|
||||
deleteCountOrder(params).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code === 20000) {
|
||||
this.$message.success("删除成功!");
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
auditCountOrder(row) {
|
||||
let params = {
|
||||
id: row.id,
|
||||
status: null
|
||||
};
|
||||
this.$confirm('请选择审核意见', '提示', {
|
||||
confirmButtonText: '通过',
|
||||
cancelButtonText: '驳回',
|
||||
type: 'warning',
|
||||
center: true,
|
||||
closeOnPressEscape: false,//按下 ESC 键关闭弹窗
|
||||
closeOnClickModal: false,//点击遮罩关闭弹窗
|
||||
distinguishCancelAndClose: true,//区分取消与关闭
|
||||
}).then(() => {
|
||||
params.status = 2; //审核通过
|
||||
updateCountOrderStatus(params).then((res) => {
|
||||
if (res.code === 20000) {
|
||||
this.$message.success("审核通过");
|
||||
this.getList();
|
||||
this.onRestDetail();
|
||||
} else {
|
||||
this.$message.error(res.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;
|
||||
}
|
||||
});
|
||||
},
|
||||
onRestDetail() {
|
||||
this.detailQuery = {
|
||||
orderIdFk: null,
|
||||
page: 1,
|
||||
limit: 20
|
||||
};
|
||||
this.detailList = [];
|
||||
this.detailTotal = 0;
|
||||
},
|
||||
handleChange(row) {
|
||||
this.detailQuery.orderIdFk = row.orderId;
|
||||
this.detailQuery.page = 1;
|
||||
this.getCountOrderDetailList()
|
||||
},
|
||||
getCountOrderDetailList() {
|
||||
this.detailLoading = true;
|
||||
getCountOrderDetailList(this.detailQuery).then((res) => {
|
||||
this.detailLoading = false;
|
||||
if (res.code === 20000) {
|
||||
this.detailList = res.data.list || [];
|
||||
this.detailTotal = res.data.total || 0;
|
||||
} else {
|
||||
this.detailList = [];
|
||||
this.detailTotal = 0;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.detailLoading = false;
|
||||
this.detailList = [];
|
||||
this.detailTotal = 0;
|
||||
});
|
||||
},
|
||||
showCode(row) {
|
||||
this.codeQuery = {
|
||||
orderIdFk: row.orderIdFk,
|
||||
relId: row.relId,
|
||||
batchNo: row.batchNo,
|
||||
edit: false
|
||||
};
|
||||
this.codesVisible = true;
|
||||
},
|
||||
},
|
||||
components: {
|
||||
invCountCodes
|
||||
},
|
||||
mounted() {
|
||||
document.body.ondrop = function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getInvList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style type="text/scss" lang="scss">
|
||||
</style>
|
||||
|
@ -0,0 +1,315 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :model="filterQuery" class="query-form" size="mini" :inline="true">
|
||||
<el-form-item class="query-form-item" label="盘点单号:">
|
||||
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号"
|
||||
clearable="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item" label="领用仓库:">
|
||||
<el-select v-model="filterQuery.invCode" placeholder="请选择仓库" clearable="true"
|
||||
@change="invChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in invList"
|
||||
: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" label="领用货位:">
|
||||
<el-select v-model="filterQuery.invSpaceCode" placeholder="请选择货位" clearable="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in spaceList"
|
||||
: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 style="margin-left: 10px;display:flex;">
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
|
||||
@current-change="handleChange"
|
||||
border>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="盘点单号" prop="orderId" width="300"></el-table-column>
|
||||
<el-table-column label="仓库" prop="invName" width="300"></el-table-column>
|
||||
<el-table-column label="货位" prop="invSpaceName" width="300"></el-table-column>
|
||||
<el-table-column label="盘点类型" prop="countType" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ countTypeMap[scope.row.countType] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盘点人" prop="createUserName" width="200"></el-table-column>
|
||||
<el-table-column label="盘点时间" prop="createTime"></el-table-column>
|
||||
<el-table-column label="状态" prop="status" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:limit.sync="filterQuery.limit"
|
||||
:page.sync="filterQuery.page"
|
||||
@pagination="getList"
|
||||
></pagination>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
|
||||
border>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="产品名称" prop="productName" width="220"></el-table-column>
|
||||
<el-table-column label="批次号" prop="batchNo" width="180"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="生产日期" prop="produceDate" width="120"></el-table-column>
|
||||
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
|
||||
<el-table-column label="盘点数量" prop="countNum" width="150"></el-table-column>
|
||||
<el-table-column label="账面数量" prop="invNum" width="150"></el-table-column>
|
||||
<el-table-column label="盘盈数量" prop="profitNum" width="150"></el-table-column>
|
||||
<el-table-column label="盘亏数量" prop="lossNum" width="150"></el-table-column>
|
||||
<el-table-column label="盈亏状态" prop="status" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag>
|
||||
{{ countStatusMap[scope.row.status] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="showCode(scope.row)"
|
||||
>详情
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:limit.sync="detailQuery.limit"
|
||||
:page.sync="detailQuery.page"
|
||||
@pagination="getList"
|
||||
></pagination>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="码详情"
|
||||
:visible.sync="codesVisible"
|
||||
width="60%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
v-if="codesVisible"
|
||||
append-to-body
|
||||
>
|
||||
<invCountCodes
|
||||
:codeQuery="codeQuery"
|
||||
></invCountCodes>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||
import {getInvSpaceList} from "@/api/inventory/invSpace";
|
||||
import {
|
||||
getCountOrderList,
|
||||
getCountOrderDetailList
|
||||
} from "@/api/inventory/invCountOrder";
|
||||
import invCountCodes from "@/views/inventory/InvCountCodes.vue";
|
||||
|
||||
export default {
|
||||
name: "InvCountOrderCompleted",
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
orderId: null,
|
||||
invCode: this.$store.getters.locInvCode,
|
||||
invSpaceCode: null,
|
||||
status: 2,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
list: [],
|
||||
total: 0,
|
||||
invList: [],
|
||||
spaceList: [],
|
||||
loading: false,
|
||||
formVisible: false,
|
||||
statusMap: {
|
||||
0: "草稿",
|
||||
1: "未审核",
|
||||
2: "已审核"
|
||||
},
|
||||
countOrder: {},
|
||||
countType: null,
|
||||
countTypeMap: {
|
||||
0: "整库盘点",
|
||||
1: "货位盘点",
|
||||
2: "部分盘点"
|
||||
},
|
||||
countStatusMap: {
|
||||
0: '亏损',
|
||||
1: '盈利',
|
||||
2: "平衡"
|
||||
},
|
||||
detailQuery: {
|
||||
orderIdFk: null,
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
detailList: [],
|
||||
detailTotal: 0,
|
||||
detailLoading: false,
|
||||
codeQuery: {
|
||||
orderIdFk: null,
|
||||
relId: null,
|
||||
batchNo: null,
|
||||
edit: false
|
||||
},
|
||||
codesVisible: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
orderId: null,
|
||||
invCode: this.$store.getters.locInvCode,
|
||||
invSpaceCode: null,
|
||||
status: 2,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.spaceList = [];
|
||||
this.getList();
|
||||
},
|
||||
onSubmit() {
|
||||
this.filterQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getCountOrderList(this.filterQuery).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code === 20000) {
|
||||
this.list = res.data.list || [];
|
||||
this.total = res.data.total || 0;
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$message.error(error.message);
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
})
|
||||
},
|
||||
invChange() {
|
||||
this.spaceList = [];
|
||||
this.filterQuery.fromInvSpaceCode = null;
|
||||
this.getSpaceList();
|
||||
},
|
||||
getInvList() {
|
||||
getInvListByUser()
|
||||
.then((response) => {
|
||||
this.invList = response.data || [];
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
getSpaceList() {
|
||||
let params = {invWarehouseCode: this.filterQuery.invCode};
|
||||
getInvSpaceList(params).then((res) => {
|
||||
this.spaceList = res.data.list || [];
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
addCountOrder(type) {
|
||||
this.formVisible = true;
|
||||
this.formName = 'add_' + type;
|
||||
this.countOrder = {};
|
||||
this.countType = type;
|
||||
},
|
||||
onRestDetail() {
|
||||
this.detailQuery = {
|
||||
orderIdFk: null,
|
||||
page: 1,
|
||||
limit: 20
|
||||
};
|
||||
this.detailList = [];
|
||||
this.detailTotal = 0;
|
||||
},
|
||||
handleChange(row) {
|
||||
this.detailQuery.orderIdFk = row.orderId;
|
||||
this.detailQuery.page = 1;
|
||||
this.getCountOrderDetailList()
|
||||
},
|
||||
getCountOrderDetailList() {
|
||||
this.detailLoading = true;
|
||||
getCountOrderDetailList(this.detailQuery).then((res) => {
|
||||
this.detailLoading = false;
|
||||
if (res.code === 20000) {
|
||||
this.detailList = res.data.list || [];
|
||||
this.detailTotal = res.data.total || 0;
|
||||
} else {
|
||||
this.detailList = [];
|
||||
this.detailTotal = 0;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.detailLoading = false;
|
||||
this.detailList = [];
|
||||
this.detailTotal = 0;
|
||||
});
|
||||
},
|
||||
showCode(row) {
|
||||
this.codeQuery = {
|
||||
orderIdFk: row.orderIdFk,
|
||||
relId: row.relId,
|
||||
batchNo: row.batchNo,
|
||||
edit: false
|
||||
};
|
||||
this.codesVisible = true;
|
||||
},
|
||||
},
|
||||
components: {
|
||||
invCountCodes
|
||||
},
|
||||
mounted() {
|
||||
document.body.ondrop = function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getInvList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style type="text/scss" lang="scss">
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue