JSelectMultiAllNoSapInventory.vue 2.6 KB
<template>
  <!-- 定义在这里的参数都是不可在外部覆盖的,防止出现问题 -->
  <j-select-multi-all-no-sap-inventory-component
    :value="value"
    :multiple="true"
    :ellipsisLength="30"
    :listUrl="url.list"
    :columns="columns"
    :np-select="false"
    v-on="$listeners"
    v-bind="attrs"
    :selectButtonText="'自有库存出库'"
  />

</template>

<script>
import JDate from '@comp/jeecg/JDate'
import JSelectMultiAllNoSapInventoryComponent from './JSelectMultiAllNoSapInventoryComponent'

export default {
  name: 'JSelectMultiAllNoSapInventory',
  components: { JDate, JSelectMultiAllNoSapInventoryComponent },
  props: {
    value: null, // any type
    queryConfig: {
      type: Array,
      default: () => []
    },
  },
  data() {
    return {
      url: { list: '/inventory/inventoryDetail/list' },
      columns: [
        { title: 'ID', align: 'center', dataIndex: 'id' },
        { title: '库区', align: 'center', dataIndex: 'zoneCode_Text' },
        { title: '供应商名称', align: 'center', dataIndex: 'vendorName' },
        { title: '供应商编码', align: 'center', dataIndex: 'vendorCode' },
        { title: '采购订单号', align: 'center', dataIndex: 'purchaseOrder' },
        { title: '库位编码', align: 'center', dataIndex: 'locationCode' },
        { title: '容器编码', align: 'center', dataIndex: 'containerCode' },
        { title: '物料编码', align: 'center', dataIndex: 'materialCode' },
        { title: '唯一号', align: 'center', dataIndex: 'suNumber' },
        { title: '库存状态', align: 'center', dataIndex: 'inventoryStatus_dictText' },
        { title: '数量', align: 'center', dataIndex: 'qty' },
        { title: '任务数量', align: 'center', dataIndex: 'taskQty' },
      ],
      // 定义在这里的参数都是可以在外部传递覆盖的,可以更灵活的定制化使用的组件
      default: {
        name: '自有库存',
        width: (parseFloat('90%') / 100) * window.innerWidth,
        valueKey: 'id',
        queryParamCode: 'zoneCode',
        queryParamText: '库区'
      },
      // 多条件查询配置
      queryConfigDefault: [
        {
          key: 'vendorCode',
          label: '供应商编码',
        },
        {
          key: 'purchaseOrder',
          label: '采购订单号',
        },
        {
          key: 'suNumber',
          label: '唯一号',
        },
      ],
    }
  },
  computed: {
    attrs() {
      return Object.assign(this.default, this.$attrs, {
        queryConfig: this.queryConfigDefault.concat(this.queryConfig)
      })
    }
  }
}
</script>

<style lang="less" scoped></style>