|
|
|
@ -1,24 +1,39 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-card class="el-card">
|
|
|
|
|
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-if="showSearch">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item class="query-form-item" label="部门:">
|
|
|
|
|
<el-select v-model="filterQuery.fromDeptCode" placeholder="请选择部门" clearable="true"
|
|
|
|
|
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-if="showSearch">
|
|
|
|
|
<el-row style=" display:flex; flex-wrap: wrap; ">
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="仓库:">
|
|
|
|
|
<el-select v-model="filterQuery.invCode" placeholder="请选择仓库" clearable="true"
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
@change="getDeptList"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in deptList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
v-for="item in invList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
<span style="float: left">{{ item.label }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="出入库时间:">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
: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">
|
|
|
|
@ -34,20 +49,21 @@
|
|
|
|
|
>查询
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="el-icon-document" @click="selectExport" :loading="selectExportLoading">选中导出Excel</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-document" @click="searchExport" :loading="searchExportLoading">结果导出Excel</el-button>
|
|
|
|
|
<!-- <el-button type="primary" icon="el-icon-document" @click="selectExport" :loading="selectExportLoading">选中导出Excel</el-button>-->
|
|
|
|
|
<!-- <el-button type="primary" icon="el-icon-document" @click="searchExport" :loading="searchExportLoading">结果导出Excel</el-button>-->
|
|
|
|
|
<el-button type="primary" icon="el-icon-printer" @click="optinPrint" :loading="optinPrintLoading">选中打印</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-printer" @click="selectPrint" :loading="selectPrinttLoading">查询结果打印</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
|
|
|
|
<el-divider style="margin: 15px"></el-divider>
|
|
|
|
|
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row borderv
|
|
|
|
|
@selection-change="handleCheckedChange">
|
|
|
|
|
@selection-change="handleCheckedChange" :row-style="{ height: '32px' }">
|
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="物资仓库" prop="fromInvName" show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="物资数量" prop="sumCount" width="120">
|
|
|
|
|
<el-table-column label="物资数量" prop="count" width="120">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="物资金额" prop="sumAmount" width="120">
|
|
|
|
|
<el-table-column label="物资金额" prop="amount" width="120">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
@ -66,9 +82,9 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
getResultOrderList,
|
|
|
|
|
getResultOrderDeptList,
|
|
|
|
|
verifyTemplateFile,
|
|
|
|
|
printOrder,
|
|
|
|
|
printOrderDept,
|
|
|
|
|
excelInoutImport, postExcelInoutImport
|
|
|
|
|
} from '@/api/inout/orderDetailResult'
|
|
|
|
|
import {getCorrespondence} from "@/api/basic/basicUnitMaintain";
|
|
|
|
@ -76,6 +92,7 @@ import {
|
|
|
|
|
getHead,executeFuc
|
|
|
|
|
} from "@/utils/customConfig";
|
|
|
|
|
import {getDeptListByUser} from "@/api/auth/authDept";
|
|
|
|
|
import {filterSubAllOptimize} from "@/api/system/invSubWarehouse";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "supInoutSearchOrder",
|
|
|
|
@ -87,6 +104,7 @@ export default {
|
|
|
|
|
filterQuery: {
|
|
|
|
|
id: "",
|
|
|
|
|
orderIdFk: null,
|
|
|
|
|
invCode: null,
|
|
|
|
|
fromCorpName: null,
|
|
|
|
|
coName: null,
|
|
|
|
|
spec: null,
|
|
|
|
@ -130,6 +148,7 @@ export default {
|
|
|
|
|
"actDateRange" : this.actDateRange,
|
|
|
|
|
"confirmDateRange" : this.confirmDateRange,
|
|
|
|
|
},
|
|
|
|
|
invList: [],
|
|
|
|
|
deptList: [],
|
|
|
|
|
actDateRange: [],
|
|
|
|
|
confirmDateRange:[],
|
|
|
|
@ -169,6 +188,14 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getInvList() {
|
|
|
|
|
filterSubAllOptimize()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.invList = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getDeptList() {
|
|
|
|
|
getDeptListByUser().then((res) => {
|
|
|
|
|
this.deptList = res.data || [];
|
|
|
|
@ -255,7 +282,7 @@ export default {
|
|
|
|
|
// } else if (this.filterQuery.actionType == 'preDetail') {
|
|
|
|
|
// this.filterQuery.invCode = '1000002'
|
|
|
|
|
// }
|
|
|
|
|
getResultOrderList(this.filterQuery)
|
|
|
|
|
getResultOrderDeptList(this.filterQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.list = response.data.list || [];
|
|
|
|
@ -290,7 +317,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
optinPrint() {
|
|
|
|
|
this.$confirm("是否确定打印选中出入库明细, 是否继续?", "提示", {
|
|
|
|
|
this.$confirm("是否确定打印选中仓库出入库信息, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
@ -299,7 +326,7 @@ export default {
|
|
|
|
|
if (this.orderSelection == null || this.orderSelection.length <= 0) {
|
|
|
|
|
return this.$message.error("请选择打印的明细!");
|
|
|
|
|
}
|
|
|
|
|
let query = {id: 4};
|
|
|
|
|
let query = {id: 8};
|
|
|
|
|
this.optinPrintLoading = true
|
|
|
|
|
verifyTemplateFile(query).then((res) => {
|
|
|
|
|
this.optinPrintLoading = false
|
|
|
|
@ -315,7 +342,7 @@ export default {
|
|
|
|
|
templateId: res.data,
|
|
|
|
|
list: this.orderSelection
|
|
|
|
|
};
|
|
|
|
|
printOrder(printParams).then((response) => {
|
|
|
|
|
printOrderDept(printParams).then((response) => {
|
|
|
|
|
//将pdf文件转换为url。
|
|
|
|
|
const binaryData = [];
|
|
|
|
|
binaryData.push(response);
|
|
|
|
@ -349,7 +376,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
|
|
let query = {id: 4};
|
|
|
|
|
let query = {id: 8};
|
|
|
|
|
this.selectPrinttLoading = true
|
|
|
|
|
verifyTemplateFile(query).then((res) => {
|
|
|
|
|
this.selectPrinttLoading = false
|
|
|
|
@ -357,6 +384,7 @@ export default {
|
|
|
|
|
let printParams = {
|
|
|
|
|
templateId: res.data,
|
|
|
|
|
orderIdFk: this.filterQuery.orderIdFk,
|
|
|
|
|
invCode: this.filterQuery.invCode,
|
|
|
|
|
nameCode: this.filterQuery.nameCode,
|
|
|
|
|
coName: this.filterQuery.coName,
|
|
|
|
|
spec: this.filterQuery.spec,
|
|
|
|
@ -384,7 +412,7 @@ export default {
|
|
|
|
|
printParams.confirmStarTime = null;
|
|
|
|
|
printParams.confirmEndTime = null;
|
|
|
|
|
}
|
|
|
|
|
printOrder(printParams).then((response) => {
|
|
|
|
|
printOrderDept(printParams).then((response) => {
|
|
|
|
|
//将pdf文件转换为url。
|
|
|
|
|
const binaryData = [];
|
|
|
|
|
binaryData.push(response);
|
|
|
|
@ -515,8 +543,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
created() {
|
|
|
|
|
this.actionType = 'norDetail';
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getDeptList();
|
|
|
|
|
this.getInvList();
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
}
|
|
|
|
|