chenlu
2024-05-23 0a567fd9c3baeb8022c77fa1a6a96d4c60cfa11c
north-glass-erp/northglass-erp/src/views/mm/stockReport/WarehouseReport.vue
@@ -1,216 +1,49 @@
<template>
    <el-header class="m-header" style="height: auto">
      <!--          <el-row :gutter="10">
                  <el-col :span="5">
                    <el-input v-model="wuliaoxinxi"
                              placeholder="物料编码\物料名称"
                              clearable
                    />
                  </el-col>
                  <el-col :span="3">
                    <el-input v-model="wuliaokuan"
                              placeholder="宽度"
                              clearable
                              oninput="value=value.replace(/\D/g,'')"
                              maxLength='6'
                    />
                  </el-col>
                  <el-col :span="3">
                    <el-input v-model="wuliaogao"
                              placeholder="高度"
                              clearable
                              oninput="value=value.replace(/\D/g,'')"
                              maxLength='6'
                    />
                  </el-col>
                  <el-col :span="3">
                    <el-cascader
                        placeholder="选择或输入类型"
                        :options="options"
                        filterable
                        clearable>
                    </el-cascader>
                  </el-col>
                  <el-col :span="10">
                    <el-button
                        id="select"
                        type="primary"
                        :icon="Search"
                        @click="autoAddRow">查询
                    </el-button>
                    <el-button
                        id="select"
                        type="primary"
                        :icon="Search">线边仓查询
                    </el-button>
                    <el-button
                        id="select"
                        type="primary"
                        :icon="Search">原片月结
                    </el-button>
                    <el-button
                        id="select"
                        type="primary"
                        :icon="Search">辅料月结
                    </el-button>
                  </el-col>
                </el-row>-->
    </el-header>
    <el-main style="padding-top: 5px">
      <el-table :data="tableData" style="width: 100%" max-height="620px"  border show-summary sum-text=" "
                empty-text="暂无数据">
        <el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
        <el-table-column fixed="left" label="操作" width="120">
          <template #default="scope">
            <el-button
                link
                type="primary"
                size="small"
                @click.prevent="deleteRow(scope.$index)"
            >
              删除
            </el-button>
            <el-button
                link
                type="primary"
                size="small"
                @click.prevent="deleteRow(scope.$index)"
            >
              标记
            </el-button>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="库存组织" width="150"/>
        <el-table-column prop="wlNumber" label="物料编码" width="150"/>
        <el-table-column prop="state" label="物料名称" width="120"/>
        <el-table-column prop="city" label="产地" width="120"/>
        <el-table-column prop="kcNumber" label="库存编号" width="150"/>
        <el-table-column prop="width" sortable label="宽度" width="120"/>
        <el-table-column prop="height" sortable label="高度" width="120"/>
        <el-table-column prop="thick" sortable label="厚度" width="120"/>
        <el-table-column prop="zip" label="主单位" width="120"/>
        <el-table-column prop="number" label="安全库存" width="120"/>
        <el-table-column prop="number" sortable label="库存数" width="120"/>
        <el-table-column prop="number" label="可用库存" width="120" show-summary="ture"/>
        <el-table-column prop="number" label="未领数量" width="120"/>
        <el-table-column prop="zip" sortable label="总面积" width="120"/>
        <el-table-column prop="zip" label="单片面积" width="120"/>
        <el-table-column prop="date" label="生产日期" width="120"/>
        <el-table-column prop="date" label="保质期" width="120"/>
        <el-table-column prop="zip" label="库存编号" width="120"/>
        <el-table-column prop="zip" label="库区" width="120"/>
        <el-table-column prop="zip" label="库位" width="120"/>
        <el-table-column prop="zip" label="积压库存" width="120"/>
        <el-table-column prop="zip" label="备注" width="120"/>
      </el-table>
    </el-main>
</template>
<script setup>
import {ref} from 'vue'
const wuliaoxinxi = ref('')
const wuliaokuan = ref('')
const wuliaogao = ref('')
const options = [
  {
    value: '0',
    label: '全部'
  },
  {
    value: '1',
    label: '原片'
  },
  {
    value: '2',
    label: '化学品'
  },
  {
    value: '3',
    label: '工具'
  },
  {
    value: '4',
    label: '木箱'
  },
  {
    value: '5',
    label: '白玻'
  },
]
import BasicTable from "@/components/BasicTable.vue"
import request from "@/utils/request"
import { ref} from "vue"
import { useI18n } from 'vue-i18n'
import dayjs from 'dayjs'
//语言获取
const { t } = useI18n()
const now = new Date()
const childrenData = ref({
  columns:[
    {type: 'seq',fixed:"left", title: t('basicData.Number'), width: '80' },
    {field: 'operationOrderNumber', width:'150', title: t('productStock.operationOrderNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderId', width: '150',title: t('order.orderId'),showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operationNumber', width: '100',title: t('order.OrderNum'), showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operateType', width: '120',title:'类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'quantity', width: '140',title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId',width: '100', title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName',width: '140', title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.width', width: '100',title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.height',width: '100', title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'staterOperationOrderNumber', width: '150',title: '调拨销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'endOperationOrderNumber', width: '100',title: '调拨序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operator', width: '100',title: t('productStock.creator'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operateTime', width:'140', title: t('productStock.productionDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'processId', width:'140', title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'type', width:'140', title: '领出类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'reviewed', width: '100',title: t('productStock.reviewed'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'reviewedTime', width: '140',title: t('productStock.approvedDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'remarks', width: '140',title: t('productStock.remarks'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
const tableData = ref([
  {
    date: '2016-05-01',
    name: 'Tom',
    state: 'California',
    city: 'Los Angeles',
    address: 'No. 189, Grove St, Los Angeles',
    zip: 'CA 90036',
    number: '999',
    width: '3660',
    height: '2440',
    rIndex: 1,
  }
])
const autoAddRow = () => {
  for (let i = 0; i < 10; i++) {
    const randomKCInt = Math.floor(Math.random() * 9999) + 10000;
    const randomInt = Math.floor(Math.random() * 999) + 1000;
    const randomZZInt = Math.floor(Math.random() * 99) + 100;
    const randomSumInt = Math.floor(Math.random() * 99) + 10;
    const kcThick = i % 3 === 0 ? 5 : i % 4 === 0 ? 6 : i % 5 === 0 ? 8 : 10;
    now.setDate(now.getDate() + 1)
    tableData.value.push({
      date: dayjs(now).format('YYYY-MM-DD'),
      name: '物料组织' + randomZZInt,
      state: '物料' + randomSumInt,
      city: '产地' + (randomSumInt * 6),
      address: 'No. 189, Grove St, Los Angeles',
      zip: 'CA 90036',
      number: 666 + 66 * i,
      width: '3660',
      height: '2440',
      rIndex: tableData.value.length + 1,
      wlNumber: 'NGWL1000' + randomInt,
      kcNumber: 'NGKC100' + randomKCInt,
      thick: kcThick
    })
  }
}
  ],//表格表头字段
  data:[],//表格数据
  url :'/FinishedGoodsInventory/getSelectFinishedOperateLogReport',
  exportUrl :'/FinishedGoodsInventory/exportFinishedOperateLogReport',
  exportName:'成品报表',
  footList:['quantity']
})
</script>
<template>
  <basic-table
      :childrenData="childrenData"/>
</template>
<style scoped>
.el-row {
  margin-bottom: 20px;
}
.el-row:last-child {
  margin-bottom: 0;
}
.el-col {
  border-radius: 4px;
}
.m-header {
  height: 64px;
}
</style>