parent
8dcbdca13c
commit
3dc2d1a0dc
9 changed files with 245 additions and 162 deletions
@ -1,59 +1,91 @@ |
||||
<template> |
||||
<el-dialog :title="purchaseTitle" append-to-body :visible.sync="openShow" width="70%" @close="closeDialog"> |
||||
<el-dialog :title="purchaseTitle" append-to-body :visible.sync="openShow" width="70%" @close="closeDialog"> |
||||
|
||||
<avue-crud :data="data" :option="option"></avue-crud> |
||||
<!-- <template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit">确 定</el-button> |
||||
</span> |
||||
</template> --> |
||||
</el-dialog> |
||||
<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:'' |
||||
} |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow:false, |
||||
option:{ |
||||
menu:false, |
||||
header:false, |
||||
align: 'center', |
||||
column:[ |
||||
{ |
||||
label:'物品名称', |
||||
prop:'wupinmingcheng' |
||||
}, { |
||||
label:'需求数量', |
||||
prop:'caigoushuliang' |
||||
},{ |
||||
label:'已出库数量', |
||||
prop:'yirukushuliang' |
||||
} |
||||
] |
||||
} |
||||
} |
||||
purchaseTitle: { |
||||
type: String, |
||||
default: '' |
||||
}, |
||||
mounted(){ |
||||
this.openShow = this.showDialog |
||||
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); |
||||
}, |
||||
methods:{ |
||||
closeDialog(){ |
||||
this.openShow = false |
||||
this.$emit('closeDialog'); |
||||
} |
||||
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> |
||||
|
||||
Loading…
Reference in new issue