PalletBillList.vue 8.48 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="$t('pallet.outboundOrderCode')">
              <a-input
                :placeholder="$t('pallet.inputOutboundOrderCode')"
                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="$t('pallet.waybillcode')">
              <a-input :placeholder="$t('pallet.inputWaybillcode')" v-model="queryParam.waybillcode"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item :label="$t('pallet.lecangsCode')">
              <a-input :placeholder="$t('pallet.inputLecangsCode')" v-model="queryParam.code"></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="$t('pallet.barcode')">
                <a-input :placeholder="$t('pallet.inputBarcode')" 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="$t('pallet.unstackStatus')">
                <j-dict-select-tag
                  :placeholder="$t('pallet.selectUnstackStatus')"
                  v-model="queryParam.isunstack"
                  dictCode="is_un_stack_status"
                />
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-form-item :label="$t('pallet.stackStatus')">
                <j-dict-select-tag
                  :placeholder="$t('pallet.selectStackStatus')"
                  v-model="queryParam.isstack"
                  dictCode="is_stack_status"
                />
              </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>
        </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: this.$t('pallet.detailId'),
          align: 'center',
          dataIndex: 'id'
        },
        {
          title: this.$t('pallet.containerCode'),
          align: 'center',
          dataIndex: 'containercode'
        },
        {
          title: this.$t('pallet.lecangsCode'),
          align: 'center',
          dataIndex: 'code'
        },
        {
          title: this.$t('pallet.barcode'),
          align: 'center',
          dataIndex: 'barcodes'
        },
        {
          title: this.$t('pallet.outboundOrderCode'),
          align: 'center',
          dataIndex: 'outboundordercode'
        },
        {
          title: this.$t('pallet.waybillcode'),
          align: 'center',
          dataIndex: 'waybillcode'
        },
        {
          title: this.$t('pallet.batch'),
          align: 'center',
          dataIndex: 'batch'
        },
        {
          title: this.$t('pallet.packPlanNum'),
          align: 'center',
          dataIndex: 'packplannum'
        },
        {
          title: this.$t('pallet.waybillPdfUrl'),
          align: 'center',
          dataIndex: 'waybillpdfurl',
          customRender: t => ellipsis1(t)
        },
        {
          title: this.$t('pallet.length'),
          align: 'center',
          dataIndex: 'editlength'
        },
        {
          title: this.$t('pallet.width'),
          align: 'center',
          dataIndex: 'editwidth'
        },
        {
          title: this.$t('pallet.height'),
          align: 'center',
          dataIndex: 'editheight'
        },
        {
          title: this.$t('pallet.weight'),
          align: 'center',
          dataIndex: 'editgrossweight'
        },
        {
          title: this.$t('pallet.scanType'),
          align: 'center',
          dataIndex: 'scantype'
        },
        {
          title: this.$t('pallet.scanContent'),
          align: 'center',
          dataIndex: 'scancontent'
        },
        {
          title: this.$t('pallet.waybillLocalUrl'),
          align: 'center',
          dataIndex: 'waybilllocalurl',
          customRender: t => ellipsis1(t)
        },
        {
          title: this.$t('pallet.isDownload'),
          align: 'center',
          dataIndex: 'isdownload'
        },
        {
          title: this.$t('pallet.unstackStatus'),
          align: 'center',
          dataIndex: 'isunstack_dictText'
        },
        {
          title: this.$t('pallet.stackStatus'),
          align: 'center',
          dataIndex: 'isstack_dictText'
        },
        {
          title: this.$t('pallet.isPrint'),
          align: 'center',
          dataIndex: 'isprint_dictText'
        },
        {
          title: this.$t('pallet.isCheckWaybill'),
          align: 'center',
          dataIndex: 'ischeckwaybill_dictText'
        },
        {
          title: this.$t('system.createTime'),
          align: 'center',
          dataIndex: 'createTime'
        },
        {
          title: this.$t('system.updateTime'),
          align: 'center',
          dataIndex: 'updateTime'
        },
        {
          title: this.$t('system.options'),
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 147,
          scopedSlots: { customRender: 'action' }
        }
      ],
      isorter: {
        column: 'id',
        order: 'desc'
      },
      url: {
        list: '/task/palletTask/listPalletBillByMainId',
        delete: '/task/palletTask/deletePalletBill',
        deleteBatch: '/task/palletTask/deleteBatchPalletBill',
        exportXlsUrl: '/task/palletTask/exportPalletBill',
        importUrl: '/task/palletTask/importPalletBill'
      },
      ipagination: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['10', '30', '50'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' 共' + total + '条'
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      dictOptions: {}
    }
  },
  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>