| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <div>
- <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 { getPages } from '@/api/wms/index';
- import { sceneState } from '@/utils/dict/index';
- export default {
- mixins: [dictMixins, tableColumnsMixin],
- props: {
- tableQuery: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- data() {
- return {
- sceneState,
- columns: [
- {
- width: 50,
- type: 'index',
- columnKey: 'index',
- align: 'center',
- label: '序号'
- },
- {
- prop: 'bizNo',
- label: '单号',
- align: 'center',
- minWidth: 110,
- showOverflowTooltip: true
- },
- {
- prop: 'warehouseName',
- label: '仓库名称',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150
- },
- {
- prop: 'bizType',
- label: '入库类型',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150,
- formatter: (row) => {
- for (const key in this.sceneState) {
- if (this.sceneState[key].code == row.bizType) {
- return this.sceneState[key].label;
- }
- }
- }
- },
- {
- prop: 'sourceBizNo',
- label: '来源单据',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150
- },
- {
- prop: 'createUserName',
- label: '入库人',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150
- },
- {
- prop: 'storageTime',
- label: '入库时间',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150
- },
- {
- prop: 'outInStatus',
- label: '入库状态',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150,
- formatter: (row) => {
- if (row.verifyStatus == 2) {
- switch (row.outInStatus) {
- case '1':
- return '预入库';
- case '2':
- return '部分入库';
- case '3':
- return '已入库';
- default:
- return '';
- }
- }
- }
- }
- ],
- cacheKeyUrl: 'mes-259231507-mwmsoutint-table'
- };
- },
- computed: {
- seekList() {
- return [
- {
- label: '工单编码:',
- value: 'workOrderCode',
- type: 'input',
- placeholder: '请输入'
- },
- {
- label: '入库时间',
- value: 'time',
- type: 'date',
- dateType: 'daterange',
- placeholder: '请输入'
- },
- {
- label: '入库单号',
- value: 'sourceBizNo',
- 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 getPages(body);
- },
- search(where) {
- console.log('where', where);
- if (where.time) {
- where.startTime = where.time[0];
- where.endTime = where.time[1];
- }
- // 覆盖时间
- this.reload({ ...where, time: null });
- }
- }
- };
- </script>
- <style></style>
|