|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-card class="el-card">
|
|
|
|
|
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="领用单号:">
|
|
|
|
|
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="领用仓库:">
|
|
|
|
|
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 90%;">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in invList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="往来信息:">
|
|
|
|
|
<el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"
|
|
|
|
|
filterable
|
|
|
|
|
remote
|
|
|
|
|
reserve-keyword
|
|
|
|
|
:remote-method="finCorpList"
|
|
|
|
|
:loading="loading"
|
|
|
|
|
style="width: 100%;">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in corpList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.name">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <el-col :span="6">-->
|
|
|
|
|
<!-- <el-form-item label="领用类型:">-->
|
|
|
|
|
<!-- <el-select v-model="filterQuery.billType" style="width: 90%" placeholder="请选择领用类型" clearable="true">-->
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
<!-- v-for="item in originTypes"-->
|
|
|
|
|
<!-- :key="item.originAction"-->
|
|
|
|
|
<!-- :label="item.originName"-->
|
|
|
|
|
<!-- :value="item.originAction">-->
|
|
|
|
|
<!-- <span style="float: left;font-size: 13px">{{ item.originName }}</span>-->
|
|
|
|
|
<!-- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{-->
|
|
|
|
|
<!-- item.thirdSysName-->
|
|
|
|
|
<!-- }}</span>-->
|
|
|
|
|
<!-- </el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="创建时间:">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
: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-col :span="8">
|
|
|
|
|
<el-form-item label="审核时间:">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
:picker-options="pickerAuditOptions"
|
|
|
|
|
v-model="actAuditDateRange"
|
|
|
|
|
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">
|
|
|
|
|
<el-button-group style="display:flex;">
|
|
|
|
|
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind">查询</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="true"
|
|
|
|
|
@current-change="handleDetail"
|
|
|
|
|
:default-sort="defaultSort" @sort-change="handleSortChange">
|
|
|
|
|
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
|
|
|
|
<el-table-column label="领用单号" prop="billNo"></el-table-column>
|
|
|
|
|
<el-table-column label="领用部门" prop="deptName"></el-table-column>
|
|
|
|
|
<el-table-column label="领用仓库" prop="invName"></el-table-column>
|
|
|
|
|
<el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></el-table-column>
|
|
|
|
|
<el-table-column label="单据状态" prop="status">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag :type="(scope.row.status)">
|
|
|
|
|
{{ statusMap[scope.row.status] }}
|
|
|
|
|
</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="创建时间" prop="createTime"
|
|
|
|
|
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
|
|
|
|
|
<el-table-column label="审核时间" prop="auditTime"
|
|
|
|
|
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="操作">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)"
|
|
|
|
|
>打印
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total>0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="filterQuery.page"
|
|
|
|
|
:limit.sync="filterQuery.limit"
|
|
|
|
|
@pagination="handleCurrentChange"
|
|
|
|
|
></pagination>
|
|
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card class="el-card">
|
|
|
|
|
<el-table v-loading="loading" :data="detailList" style="width: 100%" border>
|
|
|
|
|
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
|
|
|
|
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
|
|
|
|
|
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>
|
|
|
|
|
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>
|
|
|
|
|
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
|
|
|
|
|
<el-table-column label="领用数量" prop="count"></el-table-column>
|
|
|
|
|
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
|
|
|
|
|
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
|
|
|
|
|
<el-table-column label="供应商" prop="supName"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible.sync="newSpDistributionVisible"
|
|
|
|
|
width="80%"
|
|
|
|
|
v-if="newSpDistributionVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
>
|
|
|
|
|
<auditDetail
|
|
|
|
|
:closeDialog="closeDialog"
|
|
|
|
|
:idQuery="idQuery"
|
|
|
|
|
></auditDetail>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
import {getOrderDetail, getReceiveOrder, printOrder} from "@/api/inout/receiveOrder";
|
|
|
|
|
import auditDetail from "@/views/inout/receive/receiveAuditDetail"
|
|
|
|
|
import {delReceive} from "@/api/thrsys/thrOrderReceive";
|
|
|
|
|
import {filterSubAll, findInvByUser} from "@/api/system/invSubWarehouse";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
defaultSort: {prop: 'createTime', order: 'desc'},
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterQuery: {
|
|
|
|
|
billAction: null,
|
|
|
|
|
billNo: "",
|
|
|
|
|
originType: null,
|
|
|
|
|
thirdSysFk: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
corpName: null,
|
|
|
|
|
type: 3,
|
|
|
|
|
editStatus: 2,
|
|
|
|
|
invCode: null
|
|
|
|
|
},
|
|
|
|
|
statusMap: {
|
|
|
|
|
1: "草稿",
|
|
|
|
|
2: "未审核",
|
|
|
|
|
3: "已审核",
|
|
|
|
|
4: "已拒绝"
|
|
|
|
|
},
|
|
|
|
|
idQuery: null,
|
|
|
|
|
invList: [],
|
|
|
|
|
invCodebe: null,
|
|
|
|
|
newSpDistributionVisible: false,
|
|
|
|
|
total: 0,
|
|
|
|
|
thirdSys: [],
|
|
|
|
|
thirdSysDetail: null,
|
|
|
|
|
busTypes: [],
|
|
|
|
|
originTypes: [],
|
|
|
|
|
list: [],
|
|
|
|
|
corpList: [],
|
|
|
|
|
detailList: [],
|
|
|
|
|
uploadFileUrl: null,
|
|
|
|
|
fileList: [],
|
|
|
|
|
uploadData: {
|
|
|
|
|
thirdSys: "thirdId",
|
|
|
|
|
},
|
|
|
|
|
loading: false,
|
|
|
|
|
actDateRange: [],
|
|
|
|
|
actAuditDateRange: [],
|
|
|
|
|
pickerOptions: {
|
|
|
|
|
shortcuts: [
|
|
|
|
|
{
|
|
|
|
|
text: "最近一周",
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
|
picker.$emit("pick", [start, end]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: "最近一个月",
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
|
|
picker.$emit("pick", [start, end]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: "最近三个月",
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
|
|
picker.$emit("pick", [start, end]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
pickerAuditOptions: {
|
|
|
|
|
shortcuts: [
|
|
|
|
|
{
|
|
|
|
|
text: "最近一周",
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
|
picker.$emit("pick", [start, end]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: "最近一个月",
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
|
|
picker.$emit("pick", [start, end]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: "最近三个月",
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
|
|
picker.$emit("pick", [start, end]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
onReset() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: "",
|
|
|
|
|
});
|
|
|
|
|
this.filterQuery = {
|
|
|
|
|
billNo: "",
|
|
|
|
|
thirdSysFk: "",
|
|
|
|
|
billFlag: null,
|
|
|
|
|
billAction: null,
|
|
|
|
|
startDate: null,
|
|
|
|
|
endDate: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
corpName: null,
|
|
|
|
|
type: 3,
|
|
|
|
|
editStatus: 2,
|
|
|
|
|
invCode: this.invCodebe,
|
|
|
|
|
};
|
|
|
|
|
this.actDateRange = [];
|
|
|
|
|
this.actAuditDateRange = [];
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onSubmitFind() {
|
|
|
|
|
this.filterQuery.page = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
hideSearch() {
|
|
|
|
|
this.showSearch = !this.showSearch;
|
|
|
|
|
},
|
|
|
|
|
deleteDialog(row) {
|
|
|
|
|
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
let dQuery = {
|
|
|
|
|
orderIdFk: row.billNo,
|
|
|
|
|
};
|
|
|
|
|
delReceive(dQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.$message.success("删除成功");
|
|
|
|
|
this.getList();
|
|
|
|
|
this.detailList = null;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleSortChange(column, prop, order) {
|
|
|
|
|
if (column.order === 'descending') {
|
|
|
|
|
this.filterQuery.sort = 'desc'
|
|
|
|
|
} else {
|
|
|
|
|
this.filterQuery.sort = 'asc'
|
|
|
|
|
}
|
|
|
|
|
this.filterQuery.orderBy = column.prop;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getList() {
|
|
|
|
|
if (this.actDateRange != null) {
|
|
|
|
|
this.filterQuery.startTime = this.actDateRange[0];
|
|
|
|
|
this.filterQuery.endTime = this.actDateRange[1];
|
|
|
|
|
} else {
|
|
|
|
|
this.filterQuery.startTime = null;
|
|
|
|
|
this.filterQuery.endTime = null;
|
|
|
|
|
}
|
|
|
|
|
if (this.actAuditDateRange != null) {
|
|
|
|
|
this.filterQuery.startAuditTime = this.actAuditDateRange[0];
|
|
|
|
|
this.filterQuery.endAuditTime = this.actAuditDateRange[1];
|
|
|
|
|
} else {
|
|
|
|
|
this.filterQuery.startAuditTime = null;
|
|
|
|
|
this.filterQuery.endAuditTime = null;
|
|
|
|
|
}
|
|
|
|
|
this.filterQuery.isUser = true;
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.detailList = []
|
|
|
|
|
getReceiveOrder(this.filterQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.list = response.data.list || [];
|
|
|
|
|
this.total = response.data.total || 0;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
this.loading = false;
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleDetail(row) {
|
|
|
|
|
var query = {};
|
|
|
|
|
query.orderIdFk = row.billNo;
|
|
|
|
|
getOrderDetail(query) //查找该单号下的所有条码
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.detailList = response.data.list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.detailList = [];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
this.filterQuery.page = val.page;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
finCorpList(val) {
|
|
|
|
|
let query = {
|
|
|
|
|
name: val,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
}
|
|
|
|
|
filterSubAll(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.corpList = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.corpList = [];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
finCurInv() {
|
|
|
|
|
this.invList = [];
|
|
|
|
|
let query = {
|
|
|
|
|
filter: 3
|
|
|
|
|
};
|
|
|
|
|
findInvByUser(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.invList = response.data || [];
|
|
|
|
|
if (this.invList.length > 0) {
|
|
|
|
|
this.filterQuery.invCode = this.invList[0].code
|
|
|
|
|
this.invCodebe = this.filterQuery.invCode
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printOrder(row) {
|
|
|
|
|
printOrder(row)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
const binaryData = [];
|
|
|
|
|
binaryData.push(response);
|
|
|
|
|
//获取blob链接。
|
|
|
|
|
let url = window.URL.createObjectURL(
|
|
|
|
|
new Blob(binaryData, {type: "application/pdf"})
|
|
|
|
|
);
|
|
|
|
|
this.loading = false;
|
|
|
|
|
window.open(url);//打开新标签页,预览pdf。
|
|
|
|
|
this.getList();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
closeDialog() {
|
|
|
|
|
this.newSpDistributionVisible = false;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
auditDetail
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.finCurInv();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
|
|
|
|
</style>
|
|
|
|
|
|