PalletBillList.vue 7.98 KB
<template>
  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="托盘编码">
              <a-input placeholder="请输入托盘码" v-model="queryParam.containercode"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="出库单号">
              <a-input placeholder="请输入出库单号" v-model="queryParam.outboundordercode"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="跟踪号">
              <a-input placeholder="请输入跟踪号" v-model="queryParam.waybillcode"></a-input>
            </a-form-item>
          </a-col>
          <template v-if="toggleSearchStatus">
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-form-item label="乐仓货品编码">
                <a-input placeholder="请输入乐仓货品编码" v-model="queryParam.code"></a-input>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-form-item label="商品码">
                <a-input placeholder="请输入商品码" v-model="queryParam.barcodes"></a-input>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-form-item label="拆垛状态">
                <a-input placeholder="请输入拆垛状态" v-model="queryParam.isunstack"></a-input>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-form-item label="码垛状态">
                <a-input placeholder="请输入码垛状态" v-model="queryParam.isstack"></a-input>
              </a-form-item>
            </a-col>
          </template>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">{{$t('button.search')}}</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('button.reset')}}</a-button>
              <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? $t('button.collapse') : $t('button.expand') }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
              </a>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :scroll="{ x: true }"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange"
      >
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">{{$t('button.edit')}}</a>
          <a-divider type="vertical" />
          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
            <a>{{ $t('button.delete') }}</a>
          </a-popconfirm>
        </span>
      </a-table>
    </div>

    <palletBill-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></palletBill-modal>
  </a-card>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import PalletBillModal from './modules/PalletBillModal'

export default {
  name: 'PalletBillList',
  mixins: [JeecgListMixin],
  components: { PalletBillModal },
  props: {
    mainId: {
      type: String,
      default: '',
      required: false
    }
  },
  watch: {
    mainId: {
      immediate: true,
      handler(val) {
        this.queryParam['pallettaskid'] = val
        this.loadData(1)
      }
    }
  },
  data() {
    let ellipsis1 = (v, l = 40) => <j-ellipsis value={v} length={l} />
    return {
      description: '托盘任务表管理页面',
      disableMixinCreated: true,
      // 表头
      columns: [
        {
          title: '详情ID',
          align: 'center',
          dataIndex: 'id'
        },
        {
          title: '托盘编码',
          align: 'center',
          dataIndex: 'containercode'
        },
        {
          title: '出库单号',
          align: 'center',
          dataIndex: 'outboundordercode'
        },
        {
          title: '跟踪号',
          align: 'center',
          dataIndex: 'waybillcode'
        },
        {
          title: '面单下载地址',
          align: 'center',
          dataIndex: 'waybillpdfurl',
          customRender: t => ellipsis1(t)
        },
        {
          title: '计划数量',
          align: 'center',
          dataIndex: 'packplannum'
        },
        {
          title: '乐仓货品编码',
          align: 'center',
          dataIndex: 'code'
        },
        {
          title: '商品码',
          align: 'center',
          dataIndex: 'barcodes'
        },
        {
          title: '长度',
          align: 'center',
          dataIndex: 'editlength'
        },
        {
          title: '宽度',
          align: 'center',
          dataIndex: 'editwidth'
        },
        {
          title: '高度',
          align: 'center',
          dataIndex: 'editheight'
        },
        {
          title: '重量',
          align: 'center',
          dataIndex: 'editgrossweight'
        },
        {
          title: '扫码类型',
          align: 'center',
          dataIndex: 'scantype'
        },
        {
          title: '已扫条码',
          align: 'center',
          dataIndex: 'scancontent'
        },
        {
          title: '面单存放地址',
          align: 'center',
          dataIndex: 'waybilllocalurl',
          customRender: t => ellipsis1(t)
        },
        {
          title: '面单下载状态',
          align: 'center',
          dataIndex: 'isdownload'
        },
        {
          title: '拆垛状态',
          align: 'center',
          dataIndex: 'isunstack'
        },
        {
          title: '码垛状态',
          align: 'center',
          dataIndex: 'isstack'
        },
        {
          title: '发送打印机状态',
          align: 'center',
          dataIndex: 'isprint'
        },
        {
          title: '面单复核状态',
          align: 'center',
          dataIndex: 'ischeckwaybill'
        },
        {
          title: '创建日期',
          align: 'center',
          dataIndex: 'createTime'
        },
        {
          title: '更新日期',
          align: 'center',
          dataIndex: 'updateTime'
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 147,
          scopedSlots: { customRender: 'action' }
        }
      ],
      url: {
        list: '/task/palletTask/listPalletBillByMainId',
        delete: '/task/palletTask/deletePalletBill',
        deleteBatch: '/task/palletTask/deleteBatchPalletBill',
        exportXlsUrl: '/task/palletTask/exportPalletBill',
        importUrl: '/task/palletTask/importPalletBill'
      },
      dictOptions: {},
      ipagination: {
        current: 1,
        pageSize: 5,
        pageSizeOptions: ['5', '10', '50'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' 共' + total + '条'
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      }
    }
  },
  created() {},
  computed: {
    importExcelUrl() {
      return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`
    }
  },
  methods: {
    clearList() {
      this.dataSource = []
      this.selectedRowKeys = []
      this.ipagination.current = 1
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>