| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
- <template>
- <div class="ele-body">
- <el-card shadow="never" v-loading="loading">
- <order-search @search="reload" ref="searchRef"> </order-search>
- <ele-pro-table
- ref="table"
- :columns="columns"
- :datasource="datasource"
- :selection.sync="selection"
- row-key="id"
- :page-size="20"
- @columns-change="handleColumnChange"
- :cache-key="cacheKeyUrl"
- >
- <template v-slot:type="{ row }">
- <span> {{ getDictValue('异常类型', row.type + '') }}</span>
- </template>
- <template v-slot:code="{ row }">
- <el-link
- type="primary"
- :underline="false"
- @click="dispose('detail', row)"
- >
- {{ row.code }}
- </el-link>
- </template>
- <!-- 操作列 -->
- <!-- 表头工具栏 -->
- <template v-slot:toolbar>
- <el-button
- size="small"
- type="primary"
- icon="el-icon-plus"
- class="ele-btn-icon"
- @click="dispose('add')"
- >
- 新建
- </el-button>
- <!-- <el-button
- size="small"
- type="danger"
- icon="el-icon-delete"
- class="ele-btn-icon"
- @click="remove()"
- plain
- :disabled="selection.length == 0"
- >
- 删除
- </el-button>
- <el-button
- size="small"
- type="primary"
- icon="el-icon-upload2"
- class="ele-btn-icon"
- plain
- >
- 导出
- </el-button>
- <el-button
- size="small"
- type="primary"
- icon="el-icon-download"
- class="ele-btn-icon"
- plain
- >
- 导入
- </el-button> -->
- <!-- <el-button
- size="small"
- type="primary"
- icon="el-icon-circle-plus-outline"
- class="ele-btn-icon"
- plain
- :disabled="selection.length == 0"
- >
- 处置
- </el-button> -->
- </template>
- <!-- <template v-slot:action="{ row }">
-
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-circle-plus-outline"
- v-if="(row.approvalStatus == 0 || row.approvalStatus == 3)&&(!row.exceptionClose||row.exceptionClose==2)"
- @click="submit(row.id)"
- >
- 提交
- </el-link>
- </template> -->
- <template v-slot:action="{ row }">
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-truck"
- v-if="row.approvalStatus == 0 || row.approvalStatus == 3"
- @click="dispose('edit', row)"
- >
- 编辑
- </el-link>
- <el-link
- type="primary"
- :underline="false"
- v-if="row.approvalStatus == 0 || row.approvalStatus == 3"
- @click="submit(row)"
- >
- 提交
- </el-link>
- <el-popconfirm
- class="ele-action"
- title="确定要删除吗?"
- v-if="row.approvalStatus == 0 || row.approvalStatus == 3"
- @confirm="remove([row.id])"
- >
- <template v-slot:reference>
- <el-link type="danger" :underline="false" icon="el-icon-delete">
- 删除
- </el-link>
- </template>
- </el-popconfirm>
- </template>
- <dispose
- ref="disposeRef"
- @done="reload"
- :relationType="relationType"
- ></dispose>
- </ele-pro-table>
- </el-card>
- <process-submit-dialog
- :isNotNeedProcess="false"
- :processSubmitDialogFlag.sync="processSubmitDialogFlag"
- v-if="processSubmitDialogFlag"
- ref="processSubmitDialogRef"
- @reload="reload"
- ></process-submit-dialog>
- </div>
- </template>
- <script>
- import OrderSearch from '../components/order-search.vue';
- import dictMixins from '@/mixins/dictMixins';
- // import Create from '../components/create';
- import dispose from '../components/addOrEditDialog';
- import { getList, remove, submit } from '@/api/exceptionManagement/index';
- import { relationTypeOption } from '@/enum/dict.js';
- import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
- import tabMixins from '@/mixins/tableColumnsMixin';
- import { reviewStatus } from '@/enum/dict';
- export default {
- components: {
- OrderSearch,
- dispose,
- processSubmitDialog
- },
- mixins: [dictMixins, tabMixins],
- props: {
- relationType: {
- default: '1,3'
- }
- },
- data() {
- return {
- visible: false,
- loading: false,
- processSubmitDialogFlag: false,
- releasParams: {
- teamId: '',
- id: ''
- },
- selection: [],
- // userOptions: [],
- viewId: '',
- qualityInspector: '',
- cacheKeyUrl: 'eos-7a45afd7-saleManage-exceptionList',
- columnsVersion: 1
- };
- },
- computed: {
- // 表格列配置
- columns() {
- // 当columnsVersion变化时会重新计算,用作更新列配置
- const version = this.columnsVersion;
- return [
- {
- columnKey: 'selection',
- type: 'selection',
- width: 45,
- align: 'center',
- fixed: 'left'
- },
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'left'
- },
- {
- prop: 'code',
- label: '编码',
- align: 'center',
- slot: 'code'
- },
- {
- prop: 'name',
- label: '名称',
- align: 'center'
- },
- {
- prop: 'progress',
- label: '进度',
- align: 'center',
- formatter: (row, column, cellValue) => {
- return cellValue == 1
- ? '处置中'
- : cellValue == 2
- ? '处置完毕'
- : cellValue == 3
- ? '暂时搁置'
- : cellValue == 4
- ? '关闭'
- : '未开始';
- }
- },
- // {
- // prop: 'describes',
- // label: '异常描述',
- // align: 'center'
- // },
- // {
- // prop: 'disposalStatus',
- // label: '处置类型',
- // align: 'center',
- // },
- {
- prop: 'relationType',
- label: '来源单据类型',
- align: 'center',
- formatter: (row, column, cellValue) => {
- return relationTypeOption[cellValue] || '';
- }
- },
- {
- prop: 'relationCode',
- label: '来源单据编码',
- align: 'center'
- },
- {
- prop: 'relationName',
- label: '来源单据名称',
- align: 'center'
- },
- {
- prop: 'createUserName',
- label: '创建人',
- align: 'center'
- },
- {
- prop: 'createTime',
- label: '创建时间',
- align: 'center'
- },
- {
- prop: 'approvalStatus',
- label: '审批状态',
- align: 'center',
- formatter: (_row, _column, cellValue) => {
- return reviewStatus[_row.approvalStatus];
- }
- },
- {
- columnKey: 'action',
- label: '操作',
- width: 180,
- align: 'center',
- resizable: false,
- fixed: 'right',
- slot: 'action',
- showOverflowTooltip: true
- }
- ];
- }
- },
- created() {
- this.requestDict('异常类型');
- // this.userOptions = [];
- // listAllUserBind().then((data) => {
- // return;
- // this.userOptions.push(...data);
- // });
- },
- filters: {},
- methods: {
- //处置
- dispose(type, row) {
- this.$refs.disposeRef.open(type, row);
- },
- /* 表格数据源 */
- datasource({ page, limit, where }) {
- return getList({
- pageNum: page,
- size: limit,
- ...where,
- relationType: this.relationType
- });
- },
- open(type, row) {
- this.$refs.create.open(type, row);
- },
- remove(id) {
- remove(id).then((res) => {
- this.reload();
- });
- },
- async submit(res) {
- this.processSubmitDialogFlag = true;
- this.$nextTick(() => {
- let params = {
- businessId: res.id,
- businessKey: 'eom_exception_approve',
- formCreateUserId: res.createUserId,
- variables: {
- businessCode: res.code,
- businessName: res.name,
- businessType: res.relationName
- }
- };
- this.$refs.processSubmitDialogRef.init(params);
- });
- },
- /* 刷新表格 */
- reload(where) {
- this.$nextTick(() => {
- this.$refs.table.reload({ page: 1, where });
- this.$emit('getToDoReminder');
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped></style>
|