| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <template>
- <div class="ele-body">
- <seek-page :seekList="seekList" @search="search"></seek-page>
- <ele-pro-table
- ref="table"
- row-key="id"
- :columns="columns"
- :datasource="datasource"
- :cache-key="cacheKeyUrl"
- autoAmendPage
- >
- </ele-pro-table>
- </div>
- </template>
- <script>
- import dictMixins from '@/mixins/dictMixins';
- import tableColumnsMixin from '@/mixins/tableColumnsMixin';
- import { batchRecordPage } from '@/api/pickorder/index';
- export default {
- mixins: [dictMixins, tableColumnsMixin],
- props: {
- tableQuery: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- data() {
- return {
- columns: [
- {
- width: 50,
- type: 'index',
- columnKey: 'index',
- align: 'center',
- label: '序号'
- },
- {
- prop: 'code',
- label: '领料单编号',
- align: 'center',
- minWidth: 110,
- showOverflowTooltip: true
- },
- {
- prop: 'workOrderCode',
- label: '关联工单编号',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150
- },
- {
- prop: 'warehouseName',
- label: '领料仓库名称',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150
- },
- {
- prop: 'createUserName',
- label: '领料人',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150
- },
- {
- prop: 'createTime',
- label: '领料时间',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150
- },
- {
- prop: 'status',
- label: '状态',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150,
- formatter: (row) => {
- switch (row.status) {
- case 0:
- return '未领料';
- case 1:
- return '已领料';
- case 2:
- return '已出库';
- case 3:
- return '部分出库';
- default:
- return '';
- }
- }
- }
- ],
- cacheKeyUrl: 'mes-259231040-material-table'
- };
- },
- computed: {
- seekList() {
- return [
- {
- label: '工单编码:',
- value: 'workOrderCode',
- type: 'input',
- placeholder: '请输入'
- },
- {
- label: '领料编码:',
- value: 'pickOrderCode',
- type: 'input',
- placeholder: '请输入'
- },
- {
- label: '领料名称:',
- value: 'pickOrderName',
- type: 'input',
- placeholder: '请输入'
- }
- ];
- }
- },
- methods: {
- // 刷新表格
- reload(where = {}) {
- this.$refs.table.reload({
- where,
- ...this.tableQuery
- });
- },
- /* 表格数据源 */
- datasource({ page, limit, where, order }) {
- // 参数
- const body = {
- ...where,
- ...order,
- pageNum: page,
- size: limit,
- ...this.tableQuery
- };
- return batchRecordPage(body);
- },
- search(where) {
- this.reload(where);
- }
- }
- };
- </script>
- <style></style>
|