1.添加申购单明细,采购计划和采购单明细页面
parent
ae83a464d5
commit
64876b65fd
@ -0,0 +1,295 @@
|
||||
<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="6">
|
||||
<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="6">
|
||||
<el-form-item label="DI/物资编码:">
|
||||
<el-input v-model="filterQuery.productId" style="width: 90%" placeholder="请输入DI/物资编码"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="物资名称:">
|
||||
<el-input v-model="filterQuery.productName" style="width: 90%" placeholder="请输入物资名称"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格型号:">
|
||||
<el-input v-model="filterQuery.spec" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="注册/备案号:">
|
||||
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="生产企业:">
|
||||
<el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="创建时间:">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="actDateRange"
|
||||
type="daterange"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
style="width: 90%"
|
||||
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>
|
||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||
<el-table-column label="申购单号" prop="billNo"></el-table-column>
|
||||
<el-table-column label="DI/物资编码" prop="productId"></el-table-column>
|
||||
<el-table-column label="物资名称" prop="productName"></el-table-column>
|
||||
<el-table-column label="规格型号" prop="spec"></el-table-column>
|
||||
<el-table-column label="申购数量" prop="count"></el-table-column>
|
||||
<el-table-column label="计量单位" prop="measname"></el-table-column>
|
||||
<el-table-column label="供应商" prop="supName"></el-table-column>
|
||||
<el-table-column label="生产企业" prop="manufactory"></el-table-column>
|
||||
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
|
||||
<el-table-column label="注册/备案人" prop="ylqxzcrbarmc"></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>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getDetailList} from "@/api/purchase/purApply";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showSearch: true,
|
||||
filterQuery: {
|
||||
billNo: null,
|
||||
productId: null,
|
||||
productName: null,
|
||||
spec: null,
|
||||
zczbhhzbapzbh: null,
|
||||
manufactory: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
},
|
||||
total: 0,
|
||||
list: [],
|
||||
loading: false,
|
||||
actDateRange: [],
|
||||
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: null,
|
||||
productId: null,
|
||||
productName: null,
|
||||
spec: null,
|
||||
zczbhhzbapzbh: null,
|
||||
manufactory: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
};
|
||||
this.actDateRange = [];
|
||||
this.getList();
|
||||
},
|
||||
|
||||
onSubmitFind() {
|
||||
this.filterQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
hideSearch() {
|
||||
this.showSearch = !this.showSearch;
|
||||
},
|
||||
getList() {
|
||||
if (this.actDateRange != null) {
|
||||
this.filterQuery.startDate = this.actDateRange[0];
|
||||
this.filterQuery.endDate = this.actDateRange[1];
|
||||
} else {
|
||||
this.filterQuery.startDate = null;
|
||||
this.filterQuery.endDate = null;
|
||||
}
|
||||
this.loading = true;
|
||||
getDetailList(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;
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val.page;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
2: "warning",
|
||||
3: "success",
|
||||
4: "danger",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
}
|
||||
;
|
||||
</script>
|
||||
<style scoped>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
.query-form-item {
|
||||
display: block !important;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,295 @@
|
||||
<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="6">
|
||||
<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="6">
|
||||
<el-form-item label="DI/物资编码:">
|
||||
<el-input v-model="filterQuery.productId" style="width: 90%" placeholder="请输入DI/物资编码"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="物资名称:">
|
||||
<el-input v-model="filterQuery.productName" style="width: 90%" placeholder="请输入物资名称"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格型号:">
|
||||
<el-input v-model="filterQuery.spec" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="注册/备案号:">
|
||||
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="生产企业:">
|
||||
<el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="创建时间:">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="actDateRange"
|
||||
type="daterange"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
style="width: 90%"
|
||||
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>
|
||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||
<el-table-column label="申购单号" prop="billNo"></el-table-column>
|
||||
<el-table-column label="DI/物资编码" prop="productId"></el-table-column>
|
||||
<el-table-column label="物资名称" prop="productName"></el-table-column>
|
||||
<el-table-column label="规格型号" prop="spec"></el-table-column>
|
||||
<el-table-column label="申购数量" prop="count"></el-table-column>
|
||||
<el-table-column label="计量单位" prop="measname"></el-table-column>
|
||||
<el-table-column label="供应商" prop="supName"></el-table-column>
|
||||
<el-table-column label="生产企业" prop="manufactory"></el-table-column>
|
||||
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
|
||||
<el-table-column label="注册/备案人" prop="ylqxzcrbarmc"></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>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getDetailList} from "@/api/purchase/purOrder";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showSearch: true,
|
||||
filterQuery: {
|
||||
billNo: null,
|
||||
productId: null,
|
||||
productName: null,
|
||||
spec: null,
|
||||
zczbhhzbapzbh: null,
|
||||
manufactory: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
},
|
||||
total: 0,
|
||||
list: [],
|
||||
loading: false,
|
||||
actDateRange: [],
|
||||
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: null,
|
||||
productId: null,
|
||||
productName: null,
|
||||
spec: null,
|
||||
zczbhhzbapzbh: null,
|
||||
manufactory: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
};
|
||||
this.actDateRange = [];
|
||||
this.getList();
|
||||
},
|
||||
|
||||
onSubmitFind() {
|
||||
this.filterQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
hideSearch() {
|
||||
this.showSearch = !this.showSearch;
|
||||
},
|
||||
getList() {
|
||||
if (this.actDateRange != null) {
|
||||
this.filterQuery.startDate = this.actDateRange[0];
|
||||
this.filterQuery.endDate = this.actDateRange[1];
|
||||
} else {
|
||||
this.filterQuery.startDate = null;
|
||||
this.filterQuery.endDate = null;
|
||||
}
|
||||
this.loading = true;
|
||||
getDetailList(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;
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val.page;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
2: "warning",
|
||||
3: "success",
|
||||
4: "danger",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
}
|
||||
;
|
||||
</script>
|
||||
<style scoped>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
.query-form-item {
|
||||
display: block !important;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,295 @@
|
||||
<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="6">
|
||||
<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="6">
|
||||
<el-form-item label="DI/物资编码:">
|
||||
<el-input v-model="filterQuery.productId" style="width: 90%" placeholder="请输入DI/物资编码"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="物资名称:">
|
||||
<el-input v-model="filterQuery.productName" style="width: 90%" placeholder="请输入物资名称"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格型号:">
|
||||
<el-input v-model="filterQuery.spec" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="注册/备案号:">
|
||||
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="生产企业:">
|
||||
<el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="创建时间:">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="actDateRange"
|
||||
type="daterange"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
style="width: 90%"
|
||||
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>
|
||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||
<el-table-column label="申购单号" prop="billNo"></el-table-column>
|
||||
<el-table-column label="DI/物资编码" prop="productId"></el-table-column>
|
||||
<el-table-column label="物资名称" prop="productName"></el-table-column>
|
||||
<el-table-column label="规格型号" prop="spec"></el-table-column>
|
||||
<el-table-column label="申购数量" prop="count"></el-table-column>
|
||||
<el-table-column label="计量单位" prop="measname"></el-table-column>
|
||||
<el-table-column label="供应商" prop="supName"></el-table-column>
|
||||
<el-table-column label="生产企业" prop="manufactory"></el-table-column>
|
||||
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
|
||||
<el-table-column label="注册/备案人" prop="ylqxzcrbarmc"></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>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getDetailList} from "@/api/purchase/purPlan";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showSearch: true,
|
||||
filterQuery: {
|
||||
billNo: null,
|
||||
productId: null,
|
||||
productName: null,
|
||||
spec: null,
|
||||
zczbhhzbapzbh: null,
|
||||
manufactory: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
},
|
||||
total: 0,
|
||||
list: [],
|
||||
loading: false,
|
||||
actDateRange: [],
|
||||
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: null,
|
||||
productId: null,
|
||||
productName: null,
|
||||
spec: null,
|
||||
zczbhhzbapzbh: null,
|
||||
manufactory: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
};
|
||||
this.actDateRange = [];
|
||||
this.getList();
|
||||
},
|
||||
|
||||
onSubmitFind() {
|
||||
this.filterQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
hideSearch() {
|
||||
this.showSearch = !this.showSearch;
|
||||
},
|
||||
getList() {
|
||||
if (this.actDateRange != null) {
|
||||
this.filterQuery.startDate = this.actDateRange[0];
|
||||
this.filterQuery.endDate = this.actDateRange[1];
|
||||
} else {
|
||||
this.filterQuery.startDate = null;
|
||||
this.filterQuery.endDate = null;
|
||||
}
|
||||
this.loading = true;
|
||||
getDetailList(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;
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val.page;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
2: "warning",
|
||||
3: "success",
|
||||
4: "danger",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
}
|
||||
;
|
||||
</script>
|
||||
<style scoped>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
.query-form-item {
|
||||
display: block !important;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue