doum
2025-09-04 9d901b4215323c97a00a068cd962f5c9c04dadfa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<template>
  <TableLayout :permissions="['business:receiveweight:query']">
    <!-- 表格和分页 -->
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="['business:receiveweight:create', 'business:receiveweight:delete']">
        <li><el-button type="primary" @click="$refs.operaReceiveWeightWindow.open('新建接单权重配置表')" icon="el-icon-plus" v-permissions="['business:receiveweight:create']">新建</el-button></li>
        <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:receiveweight:delete']">删除</el-button></li>
      </ul>
      <el-table
          :height="tableHeightNew"
        v-loading="isWorking.search"
        :data="tableData.list"
        stripe
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="receiveMax" label="最大接单量" min-width="100px">
          <template slot-scope="{row}">
            {{row.receiveMin||0}}{{' - '}}{{row.receiveMax||0}}
          </template>
        </el-table-column>
<!--        <el-table-column label="状态">
          <template slot-scope="{row}">
            <el-switch :disabled="row.isFixed ==1" @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
                       inactive-color="#ff4949" :active-value="0" :inactive-value="1">
            </el-switch>
          </template>
        </el-table-column>-->
        <el-table-column prop="level" label="优先级" min-width="100px"></el-table-column>
        <el-table-column prop="delayTime" label="订单查看延迟时间" min-width="100px"></el-table-column>
        <el-table-column prop="updateUserName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="updateTime" label="最近操作时间" min-width="150px"></el-table-column>
        <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column>
        <el-table-column
          v-if="containPermissions(['business:receiveweight:update', 'business:receiveweight:delete'])"
          label="操作"
          min-width="120"
          fixed="right"
        >
          <template slot-scope="{row}">
            <el-button type="text" @click="$refs.operaReceiveWeightWindow.open('编辑接单权重配置表', row)" icon="el-icon-edit" v-permissions="['business:receiveweight:update']">编辑</el-button>
            <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:receiveweight:delete']">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination
        @size-change="handleSizeChange"
        @current-change="handlePageChange"
        :pagination="tableData.pagination"
      >
      </pagination>
    </template>
    <!-- 新建/修改 -->
    <OperaReceiveWeightWindow ref="operaReceiveWeightWindow" @success="handlePageChange"/>
  </TableLayout>
</template>
 
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaReceiveWeightWindow from '@/components/business/OperaReceiveWeightWindow'
export default {
  name: 'ReceiveWeight',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaReceiveWeightWindow },
  data () {
    return {
      // 搜索
      searchForm: {
        id: '',
        deleted: '',
        status: '',
        createUser: '',
        createTime: '',
        updateUser: '',
        updateTime: '',
        remark: '',
        receiveMax: '',
        receiveMin: '',
        level: '',
        delayTime: '',
        sortnum: ''
      }
    }
  },
  created () {
    this.config({
      module: '接单权重配置表',
      api: '/business/receiveWeight',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
  }
}
</script>