| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <template>
- <div class="ele-body">
- <el-card shadow="never">
- <search ref="search" @search="reload"></search>
- <ele-pro-table
- ref="table"
- :columns="columns"
- :datasource="datasource"
- :pageSize="20"
- :pageSizes="[20, 40, 60, 80, 100]"
- @columns-change="handleColumnChange"
- :cache-key="cacheKeyUrl"
- >
- <!-- 表头工具栏 -->
- <template v-slot:toolbar> </template>
- <template v-slot:code="{ row }">
- <el-link type="primary" :underline="false">
- {{ row.code }}
- </el-link>
- </template>
- </ele-pro-table>
- </el-card>
- </div>
- </template>
- <script>
- import search from './components/search.vue';
- import { getSampleSmallWhole } from '@/api/samplemanagement';
- import dictMixins from '@/mixins/dictMixins';
- import tabMixins from '@/mixins/tableColumnsMixin';
- export default {
- mixins: [dictMixins, tabMixins],
- components: {
- search
- },
- data() {
- return {
- cacheKeyUrl: 'qms-c2e9664a-sample-whole',
- columns: [
- {
- type: 'index',
- columnKey: 'index',
- align: 'center',
- label: '序号',
- width: 55,
- showOverflowTooltip: true
- },
- {
- label: '样品编码',
- prop: 'sampleCode',
- width: '150',
- align: 'center',
- showOverflowTooltip: true,
- slot: 'sampleCode'
- },
- {
- label: '编码',
- prop: 'categoryCode',
- width: '150',
- align: 'center',
- showOverflowTooltip: true,
- slot: 'categoryCode'
- },
- {
- label: '名称',
- prop: 'categoryName',
- width: '150',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '批次号',
- prop: 'batchNo',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '发货条码',
- prop: 'barcodes',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '包装编码',
- prop: 'packageNo',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '包装数量',
- prop: 'packingQuantity',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '包装单位',
- prop: 'packingUnit',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '计量数量',
- prop: 'measureQuantity',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '计量单位',
- prop: 'measureUnit',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '物料代号',
- prop: 'materielDesignation',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '客户代号',
- prop: 'clientCode',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '刻码',
- prop: 'engrave',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '仓库',
- prop: 'warehouseName',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '货区',
- prop: 'areaName',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '货架',
- prop: 'goodsShelfName',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '货位',
- prop: 'goodsAllocationName',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '生产日期',
- prop: 'productionDate',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '采购日期',
- prop: 'purchaseDate',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '重量',
- prop: 'weight',
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'right'
- },
- {
- label: '重量单位',
- prop: 'weightUnit',
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'right'
- },
- {
- label: '处置状态',
- prop: 'disposalStatus',
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'right',
- formatter: (row, column, cellValue) => {
- return cellValue == 1
- ? '返工'
- : cellValue == 2
- ? '返修'
- : cellValue == 3
- ? '报废'
- : cellValue == 4
- ? '降级使用'
- : cellValue == 5
- ? '让步接收'
- : cellValue == 6
- ? '留样'
- : cellValue == 7
- ? '消耗'
- : cellValue == 8
- ? '回用'
- : '';
- }
- },
- {
- label: '处置时间',
- prop: 'disposeTime',
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'right'
- },
- {
- label: '检测状态',
- prop: 'qualityStatus',
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'right',
- formatter: (row, column, cellValue) => {
- return cellValue == 0
- ? '未检'
- : cellValue == 1
- ? '已检'
- : cellValue == 2
- ? '待检'
- : '';
- }
- },
- {
- label: '检测结果',
- prop: 'qualityResults',
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'right',
- formatter: (row, column, cellValue) => {
- return cellValue == 1 ? '合格' : cellValue == 2 ? '不合格' : '';
- }
- }
- ]
- };
- },
- created() {
- // this.requestDict('取样类型');
- },
- methods: {
- datasource({ page, where, limit }) {
- where.conditionType = 1;
- return getSampleSmallWhole({
- ...where,
- pageNum: page,
- size: limit
- });
- },
- reload(where) {
- this.$refs.table.reload({ page: 1, where });
- }
- }
- };
- </script>
|