| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- <template>
- <div class="ele-body" style="width: 100%">
- <el-card shadow="never" v-loading="loading" style="width: 100%">
- <div class="ele-border-lighter form-content" v-loading="loading">
- <search-table @search="reload"></search-table>
- <!-- 数据表格 -->
- <ele-pro-table
- ref="table"
- :columns="columns"
- :datasource="datasource"
- height="calc(100vh - 410px)"
- style="margin-bottom: 10px"
- full-height="calc(100vh - 116px)"
- tool-class="ele-toolbar-form"
- :selection.sync="selection"
- @columns-change="handleColumnChange"
- :cache-key="cacheKeyUrl"
- :page-size="20"
- >
- <template v-slot:orderNo="{ row }">
- <el-link
- type="primary"
- :underline="false"
- @click="openorderDetail(row, 'orderNo')"
- >
- {{ row.orderNo }}
- </el-link>
- </template>
- <!-- 表头工具栏 -->
- <template v-slot:action="{ row }">
- <el-button
- size="small"
- type="primary"
- class="ele-btn-icon"
- @click="openEdit(row)"
- >
- 详情
- </el-button>
- </template>
- </ele-pro-table>
- </div>
- </el-card>
- <order-detail-dialog ref="orderDetailDialogRef"></order-detail-dialog>
- <detailDialog ref="detailDialog" @success="reload"></detailDialog>
- </div>
- </template>
- <script>
- import searchTable from './components/searchTable.vue';
- import orderDetailDialog from '@/views/saleManage/saleOrder/components/detailDialog.vue';
- import detailDialog from './components/detailDialog.vue';
- import dictMixins from '@/mixins/dictMixins';
- import { getTableList } from '@/api/saleManage/palletManagement';
- import tabMixins from '@/mixins/tableColumnsMixin';
- export default {
- mixins: [dictMixins,tabMixins],
- components: {
- searchTable,
- orderDetailDialog,
- detailDialog
- },
- data() {
- return {
- loading: false, // 加载状态
- cacheKeyUrl:'eos-3f2ac512-saleOrder-palletManagement',
- columns: [
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'left'
- },
- {
- prop: 'projectName',
- label: '项目名称',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 180
- },
- {
- prop: 'orderNo',
- label: '销售订单编码',
- align: 'center',
- sortable: true,
- slot: 'orderNo',
- showOverflowTooltip: true,
- minWidth: 200
- },
- {
- prop: 'productName',
- label: '托盘名称',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'totalCount',
- label: '托盘数量',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'resviceNum',
- label: '已回收数量',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'noResviceNum',
- label: '未回收数量',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- columnKey: 'action',
- label: '操作',
- width: 160,
- align: 'center',
- resizable: false,
- slot: 'action',
- showOverflowTooltip: true,
- fixed: 'right'
- }
- // {
- // prop: 'createUserName',
- // label: '创建人',
- // align: 'center',
- // showOverflowTooltip: true,
- // minWidth: 80
- // },
- // {
- // prop: 'createTime',
- // label: '创建时间',
- // align: 'center',
- // showOverflowTooltip: true,
- // minWidth: 170
- // },
- ]
- };
- },
- computed: {},
- activated() {
- // 由 keep-alive 切回时刷新列表,但保留搜索条件与当前页码
- if (this.$refs.table) {
- this.$refs.table.reload();
- }
- },
- methods: {
- /* 表格数据源 */
- datasource({ page, limit, where, order }) {
- return getTableList({
- pageNum: page,
- size: limit,
- ...where
- });
- },
- /* 刷新表格 */
- reload(where) {
- this.$refs.table.reload({ page: 1, where });
- this.$emit('getToDoReminder')
- },
- openEdit(row) {
- this.$refs.detailDialog.open(row);
- },
- //查看详情
- openorderDetail(row, type) {
- if (type === 'docNo') {
- this.$refs.DetailDialogRef.open(row);
- }
- if (type === 'orderNo') {
- this.$refs.orderDetailDialogRef.open({ id: row.orderId });
- }
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .ele-body {
- padding-top: 0;
- padding-bottom: 0;
- }
- :deep .el-card__body {
- padding: 0;
- }
- :deep(.el-link--inner) {
- margin-left: 0px !important;
- }
- .sys-organization-list {
- height: calc(100vh - 264px);
- box-sizing: border-box;
- border-width: 1px;
- border-style: solid;
- overflow: auto;
- }
- .sys-organization-list :deep(.el-tree-node__content) {
- height: 40px;
- & > .el-tree-node__expand-icon {
- margin-left: 10px;
- }
- }
- .switch_left ul .active {
- border-top: 4px solid var(--color-primary);
- color: var(--color-primary-5);
- }
- .switch {
- padding-bottom: 20px;
- }
- .el-dropdown-link {
- cursor: pointer;
- color: var(--color-primary-5);
- }
- .el-icon-arrow-down {
- font-size: 12px;
- }
- </style>
|