You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<template>
|
|
|
|
|
<el-dialog :title="purchaseTitle" append-to-body :visible.sync="openShow" width="70%" @close="closeDialog">
|
|
|
|
|
|
|
|
|
|
<avue-crud :data="data" :option="option" @current-change="currentChange" @size-change="sizeChange"
|
|
|
|
|
@refresh-change="refreshChange" :page.sync="page" @on-load="onLoad"></avue-crud>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { getPutPurchaseList } from "@/api/firstOrder/outbound";
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
showDialog: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
purchaseTitle: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
|
|
|
|
},
|
|
|
|
|
id: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
openShow: false,
|
|
|
|
|
data: [],
|
|
|
|
|
query: {},
|
|
|
|
|
loading: false,
|
|
|
|
|
page: {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
total: 0
|
|
|
|
|
},
|
|
|
|
|
option: {
|
|
|
|
|
menu: false,
|
|
|
|
|
header: false,
|
|
|
|
|
align: 'center',
|
|
|
|
|
// page: true,
|
|
|
|
|
column: [
|
|
|
|
|
{
|
|
|
|
|
label: '物资名称',
|
|
|
|
|
prop: 'materialName'
|
|
|
|
|
}, {
|
|
|
|
|
label: '计划需求数量',
|
|
|
|
|
prop: 'requiredQuantity'
|
|
|
|
|
}, {
|
|
|
|
|
label: '已出库数量',
|
|
|
|
|
prop: 'outboundQuantity'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.openShow = this.showDialog
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
closeDialog() {
|
|
|
|
|
this.openShow = false
|
|
|
|
|
this.$emit('closeDialog');
|
|
|
|
|
},
|
|
|
|
|
currentChange(currentPage) {
|
|
|
|
|
this.page.currentPage = currentPage;
|
|
|
|
|
},
|
|
|
|
|
sizeChange(pageSize) {
|
|
|
|
|
this.page.pageSize = pageSize;
|
|
|
|
|
},
|
|
|
|
|
refreshChange() {
|
|
|
|
|
this.onLoad(this.page, this.query);
|
|
|
|
|
},
|
|
|
|
|
onLoad(page, params = {}) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
const queryParams = Object.assign(params, this.query, {
|
|
|
|
|
onePutStorageId: this.id
|
|
|
|
|
});
|
|
|
|
|
getPutPurchaseList(page.currentPage, page.pageSize, queryParams).then(res => {
|
|
|
|
|
console.log('采购单列表', res.data.result)
|
|
|
|
|
// const data = res.data.data;
|
|
|
|
|
this.data = res.data.result.list;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.page.total = res.data.result.total;
|
|
|
|
|
// this.selectionClear();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped></style>
|