parent
8dcbdca13c
commit
3dc2d1a0dc
9 changed files with 245 additions and 162 deletions
@ -1,59 +1,91 @@ |
|||||||
<template> |
<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> |
<avue-crud :data="data" :option="option" @current-change="currentChange" @size-change="sizeChange" |
||||||
<!-- <template #footer> |
@refresh-change="refreshChange" :page.sync="page" @on-load="onLoad"></avue-crud> |
||||||
<span class="dialog-footer"> |
</el-dialog> |
||||||
<el-button @click="closeDialog">取 消</el-button> |
|
||||||
<el-button type="primary" @click="submit">确 定</el-button> |
|
||||||
</span> |
|
||||||
</template> --> |
|
||||||
</el-dialog> |
|
||||||
</template> |
</template> |
||||||
<script> |
<script> |
||||||
|
import { getPutPurchaseList } from "@/api/firstOrder/outbound"; |
||||||
export default { |
export default { |
||||||
props: { |
props: { |
||||||
showDialog: { |
showDialog: { |
||||||
type: Boolean, |
type: Boolean, |
||||||
default: false |
default: false |
||||||
}, |
|
||||||
purchaseTitle:{ |
|
||||||
type:String, |
|
||||||
default:'' |
|
||||||
} |
|
||||||
}, |
}, |
||||||
data() { |
purchaseTitle: { |
||||||
return { |
type: String, |
||||||
openShow:false, |
default: '' |
||||||
option:{ |
|
||||||
menu:false, |
|
||||||
header:false, |
|
||||||
align: 'center', |
|
||||||
column:[ |
|
||||||
{ |
|
||||||
label:'物品名称', |
|
||||||
prop:'wupinmingcheng' |
|
||||||
}, { |
|
||||||
label:'需求数量', |
|
||||||
prop:'caigoushuliang' |
|
||||||
},{ |
|
||||||
label:'已出库数量', |
|
||||||
prop:'yirukushuliang' |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
}, |
||||||
mounted(){ |
id: { |
||||||
this.openShow = this.showDialog |
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:{ |
onLoad(page, params = {}) { |
||||||
closeDialog(){ |
this.loading = true; |
||||||
this.openShow = false |
const queryParams = Object.assign(params, this.query, { |
||||||
this.$emit('closeDialog'); |
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> |
</script> |
||||||
<style lang="scss" scoped></style> |
<style lang="scss" scoped></style> |
||||||
|
|||||||
Loading…
Reference in new issue