1.提交新增盘点单据和盘点单据审核页面修改

feature-order-fix
x_z 2 years ago
parent af6ea1cf23
commit 7caf4e9cd2

@ -31,3 +31,11 @@ export function saveCountOrder(data) {
data: data
});
}
export function submitAudit(params) {
return axios({
url: "/invCount/order/submitAudit",
method: "get",
params: params
});
}

@ -1081,7 +1081,7 @@ export const asyncRouterMap = [
{
path: "countOrderCompleted",
component: invCountOrderCompleted,
name: "已完成盘点单",
name: "盘点单查询",
icon: "",
meta: {
authRule: ["invCount/countOrderCompleted"]

@ -246,7 +246,6 @@
</template>
<script>
import store from "../../store";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {isBlank} from "@/utils/strUtil";
import {filterAllByUser} from "@/api/basic/invWarehouse";
@ -416,6 +415,7 @@ export default {
selection.forEach(product => {
let data = {
productName: product.cpmctymc,
relIdFk: product.relIdFk,
spce: product.ggxh,
batchNo: product.batchNo,
productDate: product.productionDate,
@ -425,7 +425,7 @@ export default {
invCount: product.inCount - product.outCount
};
this.codeArray.push(data);
})
});
this.selectInvProductVisible = false;
},
deleteCodeArray(index, row) {

@ -18,6 +18,7 @@
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
@change="invWarehouseChange"
:disabled="invWarehouseDisabled"
size="mini">
<el-option
@ -29,6 +30,19 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.invSpaceCode" placeholder="请选择当前货位" clearable="true"
:disabled="invSpaceDisabled"
size="mini">
<el-option
v-for="item in spaceCodeList"
: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>
<el-button
@ -44,33 +58,71 @@
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table v-loading="loading" :data="list" style="width: 100%"
highlight-current-row="true"
@current-change="handleChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="nameCode" width="120"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc" width="180">
<el-table-column label="盘点单号" prop="orderId" width="180"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="180"></el-table-column>
<el-table-column label="分库" prop="invSubStorageName" width="180"
show-overflow-tooltip></el-table-column>
<el-table-column label="货位" prop="invSpaceName" width="120"></el-table-column>
<el-table-column label="盘点人" prop="createUser" width="120"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="150"></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="规格型号" prop="ggxh" width="180" show-overflow-tooltip>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="intentDetail(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-column label="批次号" prop="batchNo" width="120"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="入库数量" prop="inCount" width="120"></el-table-column>
<el-table-column label="出库数量" prop="outCount" width="120"></el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
<el-table-column label="结余数量" prop="reCount" width="120">
<el-card>
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="180"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="180"></el-table-column>
<el-table-column label="分库" prop="invSubStorageName" width="180"
show-overflow-tooltip></el-table-column>
<el-table-column label="货位" prop="invSpaceName" width="120"></el-table-column>
<el-table-column label="盘点人" prop="createUser" width="120"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="150"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
{{ (scope.row.inCount - scope.row.outCount) }}
<el-tag>
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="分库" prop="invSubStorageName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button
@ -91,14 +143,14 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
<el-pagination
:page-size="detailQuery.limit"
@current-change="handleCurrentDetailChange"
layout="prev, pager, next"
:total="detailTotal"
></el-pagination>
</el-card>
</div>
</template>
@ -108,6 +160,8 @@ import {filterUplLocInv} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {userInfo} from "@/api/auth/login";
import {isBlank} from "@/utils/strUtil";
import {getCountOrderList, getCountOrderDetailList, deleteCountOrder} from "@/api/inventory/invCountOrder";
import {getSpaceCodeList} from "@/api/inventory/invSpace";
export default {
data() {
@ -115,17 +169,33 @@ export default {
filterQuery: {
invWarehouseCode: null,
invStorageCode: null,
invSpaceCode: null,
status: 1,
page: 1,
limit: 20,
customerId: null,
},
detailQuery: {
orderIdFk: null,
page: 1,
limit: 20
},
list: [],
detailList: [],
storageList: [],
subInvList: [],
spaceCodeList: [],
codeDetailVisible: false,
total: 0,
detailTotal: 0,
loading: true,
invWarehouseDisabled: true,
invSpaceDisabled: true,
statusMap: {
0: "未提交",
1: "未审核",
2: "已审核"
},
};
},
methods: {
@ -137,9 +207,17 @@ export default {
customerId: null,
invWarehouseCode: null,
invStorageCode: null,
invSpaceCode: null,
status: 1,
page: 1,
limit: 20,
};
this.detailQuery = {
orderIdFk: null,
page: 1,
limit: 20
};
this.detailTotal = 0;
this.invChange();
this.getList();
},
@ -152,16 +230,50 @@ export default {
this.filterQuery.page = val;
this.getList();
},
handleCurrentDetailChange(val) {
this.detailQuery.page = val;
this.getCountOrderDetailList();
},
getList() {
this.loading = true;
this.filterQuery.customerId = store.getters.customerId;
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.list = [];
this.total = 0;
}
}).catch((error) => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getCountOrderDetailList() {
getCountOrderDetailList(this.detailQuery).then((res) => {
if (res.code === 20000) {
this.list = res.data.list || [];
this.total = res.data.total || 0;
}
}).catch(() => {
});
},
deleteOrders(data) {
this.loading = true;
let query = {
id: data,
}
deleteCountOrder(query).then((res) => {
if (res.code === 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(res.message());
}
})
},
deleteDialog(rowId) {
@ -185,12 +297,12 @@ export default {
.catch(() => {
});
},
invChange() {
this.filterQuery.invWarehouseCode = "";
this.filterQuery.invWarehouseCode = null;
this.filterQuery.invSpaceCode = null;
this.subInvList = [];
if (this.filterQuery.invStorageCode != null && this.filterQuery.invStorageCode != "") {
this.spaceCodeList = [];
if (!isBlank(this.filterQuery.invStorageCode)) {
this.invWarehouseDisabled = false;
let query = {
pcode: this.filterQuery.invStorageCode
@ -205,36 +317,44 @@ export default {
this.invWarehouseDisabled = true;
}
},
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
invWarehouseChange() {
this.invSpaceDisabled = false;
this.filterQuery.invSpaceCode = null;
if (!isBlank(this.filterQuery.invWarehouseCode) && !isBlank(this.filterQuery.invStorageCode)) {
//
let params = {
invStorageCode: this.filterQuery.invStorageCode,
invWarehouseCode: this.filterQuery.invWarehouseCode
};
getSpaceCodeList(params).then((res) => {
if (res.code === 20000) {
this.spaceCodeList = res.data || [];
}
})
}
},
handleChange(row) {
this.detailQuery.orderIdFk = row.id;
this.detailQuery.page = 1;
this.getCountOrderDetailList();
},
},
created() {
this.getStorage();
this.findMethod();
let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit);
//
//
userInfo().then((res) => {
if (res.code === 20000) {
if (!isBlank(res.data.locInvCode)) {
this.filterQuery.invStorageCode = res.data.locInvCode;
this.invChange();
this.filterQuery.invWarehouseCode = res.data.locSubInvCode;
this.invChange();
}
this.getList();
}
}).catch((error) => {
});
}
,
}
;
},
};
</script>
<style type="text/scss" lang="scss">

@ -63,7 +63,7 @@
show-overflow-tooltip></el-table-column>
<el-table-column label="货位" prop="invSpaceName" width="120"></el-table-column>
<el-table-column label="盘点人" prop="createUser" width="120"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="120"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="150"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag>
@ -71,7 +71,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<el-table-column label="操作" width="180" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@ -89,12 +89,12 @@
</el-button
>
<el-buttons
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-buttons
</el-button
>
</template>
</el-table-column>
@ -120,12 +120,14 @@
:closeDialog="closeAddDialog"
></addCountOrder>
</el-dialog>
</div>
</template>
<script>
import store from "../../store";
import {getCountOrderList, deleteCountOrder} from "@/api/inventory/invCountOrder";
import {getCountOrderList, deleteCountOrder, submitAudit} from "@/api/inventory/invCountOrder";
import {filterUplLocInv} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {userInfo} from "@/api/auth/login";
@ -220,7 +222,7 @@ export default {
})
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该单, 是否继续?", "提示", {
this.$confirm("此操作将永久删除该盘点单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -259,7 +261,15 @@ export default {
}
},
submitAudit(row) {
let params = {id: row.id};
submitAudit(params).then((res) => {
if (res.code === 20000) {
this.$message.success("提交成功");
this.getList();
} else {
this.$message.error(res.message);
}
})
},
addCountOrder() {
this.addCountOrderVisible = true;

Loading…
Cancel
Save