|
@@ -0,0 +1,135 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="ele-body">
|
|
|
|
|
+ <el-card shadow="never">
|
|
|
|
|
+ <seek-page :seekList="seekList" @search="search"></seek-page>
|
|
|
|
|
+ <ele-pro-table
|
|
|
|
|
+ ref="table"
|
|
|
|
|
+ row-key="id"
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ :datasource="datasource"
|
|
|
|
|
+ cache-key="qms-2511141047-sampleRecord-table"
|
|
|
|
|
+ autoAmendPage
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-slot:toolbar>
|
|
|
|
|
+ <el-button type="primary" size="mini">新增</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-slot:action="{ row }">
|
|
|
|
|
+ <el-link type="primary" :underline="false" icon="el-icon-edit">
|
|
|
|
|
+ 编辑
|
|
|
|
|
+ </el-link>
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
|
+ class="ele-action"
|
|
|
|
|
+ title="确定要删除此条数据吗?"
|
|
|
|
|
+ @confirm="deleteRow(row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-slot:reference>
|
|
|
|
|
+ <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
|
|
+ 删除
|
|
|
|
|
+ </el-link>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ele-pro-table>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
|
|
+ import tableColumnsMixin from '@/mixins/tableColumnsMixin';
|
|
|
|
|
+ import { samplingRecordsPage } from '@/api/samplingRecords';
|
|
|
|
|
+
|
|
|
|
|
+ export default {
|
|
|
|
|
+ mixins: [dictMixins, tableColumnsMixin],
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ columns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ width: 50,
|
|
|
|
|
+ type: 'index',
|
|
|
|
|
+ columnKey: 'index',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ label: '序号'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'code',
|
|
|
|
|
+ label: '质检工单编码',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 110,
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'status',
|
|
|
|
|
+ label: '状态',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 150,
|
|
|
|
|
+ formatter: (row) => {}
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ columnKey: 'action',
|
|
|
|
|
+ label: '操作',
|
|
|
|
|
+ width: 220,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ resizable: false,
|
|
|
|
|
+ fixed: 'right',
|
|
|
|
|
+ slot: 'action',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ seekList() {
|
|
|
|
|
+ return [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '质检工单编码:',
|
|
|
|
|
+ value: 'workOrderCode',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ placeholder: '请输入'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '来源单号:',
|
|
|
|
|
+ value: 'workOrderCode',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ placeholder: '请输入'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '类型:',
|
|
|
|
|
+ value: 'type',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ placeholder: '请输入',
|
|
|
|
|
+ planList: [
|
|
|
|
|
+ { label: '类型一', value: '1' },
|
|
|
|
|
+ { label: '类型二', value: '2' }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ // 刷新表格
|
|
|
|
|
+ reload(where = {}) {
|
|
|
|
|
+ this.$refs.table.reload({
|
|
|
|
|
+ where
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ /* 表格数据源 */
|
|
|
|
|
+ datasource({ page, limit, where, order }) {
|
|
|
|
|
+ // 参数
|
|
|
|
|
+ const body = {
|
|
|
|
|
+ ...where,
|
|
|
|
|
+ ...order,
|
|
|
|
|
+ pageNum: page,
|
|
|
|
|
+ size: limit
|
|
|
|
|
+ };
|
|
|
|
|
+ return samplingRecordsPage(body);
|
|
|
|
|
+ },
|
|
|
|
|
+ search(where) {
|
|
|
|
|
+ this.reload(where);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style></style>
|