123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <template>
- <template-page
- ref="pageRef"
- :getList="getList"
- :exportList="exportList"
- :operation="operation()"
- :optionsEvensGroup="optionsEvensGroup"
- :columnParsing="columnParsing"
- >
- <Popu v-if="visible">
- <PurchaseDetail :listItem="queryItem" @close="handleClose" />
- </Popu>
- </template-page>
- </template>
- <script>
- import TemplatePage from '@/components/template/template-page-1.vue'
- import import_mixin from '@/components/template/import_mixin.js'
- import add_callback_mixin from '@/components/template/add_callback_mixin.js'
- import Popu from '@/components/template/popu.vue'
- import { getPurchaseOrderListV2,exportPurchaseOrderV2 } from '@/api/supply/purchase'
- import PurchaseDetail from '@/views/supply/purchase/components/purchase_detail'
- export default {
- components: { TemplatePage, Popu, PurchaseDetail },
- mixins: [import_mixin, add_callback_mixin],
- data() {
- return {
- visible: false,
- // 事件组合
- optionsEvensGroup: [
-
- ],
- // 表格属性
- tableAttributes: {
- // 启用勾选列
- selectColumn: true
- }, // 关闭新增弹窗
- // 表格事件
- tableEvents: {
- 'selection-change': this.selectionChange
- },
- recordSelected: [],
- currentPage: 1, // 当前页码
- pageSize: 10, // 每页数量
- listTotal: 0, // 列表总数
- dataList: null, // 列表数据
- listLoading: false, // 列表加载loading
- screenForm: {
- // 筛选表单数据
- business: '',
- supplier: '',
- date: []
- },
- isCollapse: true,
- queryItem: {}
- }
- },
- methods: {
- // 列表请求函数
- getList(...p) {
- this.recordSelected = []
- return getPurchaseOrderListV2(...p)
- },
- // 列表导出函数
- exportList: exportPurchaseOrderV2,
- // 表格列解析渲染数据更改
- columnParsing(item, defaultData) {
- return defaultData
- },
- // 监听勾选变化
- selectionChange(data) {
- this.recordSelected = data
- },
- operation() {
- return (h, { row, index, column }) => {
- return (
- <div class="operation-btns">
- <el-button
- size="mini"
- type="text"
- onClick={ () => {
- this.visible = true
- this.toDetail(row)
- }}
- >
- 详情
- </el-button>
- </div>
- )
- }
- },
- handleClose() {
- this.addOff(() => {
- this.visible = false
- })()
- },
- // 进入详情
- toDetail(item) {
- this.queryItem = item
- },
- }
- }
- </script>
- <style lang="scss" scoped></style>
|