|
@@ -1,13 +1,25 @@
|
|
|
<template>
|
|
|
<div class="office-sop flex flex-col h-full">
|
|
|
- <SearchForm :fields="fields" :params="params"></SearchForm>
|
|
|
-
|
|
|
- <div class="flex-1 page-wrap">
|
|
|
- <div class="btn-group">
|
|
|
- <t-button theme="success" :disabled="!selectedRowKeys.length"
|
|
|
+ <!-- <div class="page-action">
|
|
|
+ <t-space size="small">
|
|
|
+ <t-button theme="default" :disabled="!selectedRowKeys.length"
|
|
|
>作废</t-button
|
|
|
>
|
|
|
- </div>
|
|
|
+ </t-space>
|
|
|
+ </div> -->
|
|
|
+ <SearchForm :fields="fields" :params="params">
|
|
|
+ <template #service="{ item, params }">
|
|
|
+ <select-service-unit v-model="params[item.prop]"></select-service-unit>
|
|
|
+ </template>
|
|
|
+ <template #user="{ item, params }">
|
|
|
+ <select-filter-user
|
|
|
+ v-model="params[item.prop]"
|
|
|
+ clearable
|
|
|
+ ></select-filter-user>
|
|
|
+ </template>
|
|
|
+ </SearchForm>
|
|
|
+
|
|
|
+ <div class="flex-1 page-wrap">
|
|
|
<t-table
|
|
|
size="small"
|
|
|
row-key="id"
|
|
@@ -31,115 +43,140 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="jsx" name="ProjectChangeReport">
|
|
|
-import { ref, reactive } from 'vue';
|
|
|
-import { getTableData } from '@/api/test';
|
|
|
+import { ref, reactive, computed } from 'vue';
|
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
|
+import { dictToOptionList } from '@/utils/tool';
|
|
|
+import { omit } from 'lodash';
|
|
|
+import { planChangeList } from '@/api/sop';
|
|
|
+import {
|
|
|
+ PLAN_CHANGE_TYPE,
|
|
|
+ CUSTOMER_TYPE,
|
|
|
+ FLOW_CHECK_STATUS,
|
|
|
+} from '@/config/constants';
|
|
|
const selectedRowKeys = ref([]);
|
|
|
const selectChange = (value, { selectedRowData }) => {
|
|
|
selectedRowKeys.value = value;
|
|
|
};
|
|
|
const columns = [
|
|
|
- {
|
|
|
- colKey: 'row-select',
|
|
|
- type: 'multiple',
|
|
|
- width: 50,
|
|
|
- fixed: 'left',
|
|
|
- },
|
|
|
- { colKey: 'a', title: '变更申请编号', minWidth: 120 },
|
|
|
- { colKey: 'b', title: '服务单元', minWidth: 80 },
|
|
|
- { colKey: 'c', title: '客户类型', width: 100 },
|
|
|
- { colKey: 'd', title: '客户名称', minWidth: 80 },
|
|
|
- { colKey: 'e', title: '项目单号' },
|
|
|
- { colKey: 'f', title: '项目名称' },
|
|
|
- { colKey: 'g', title: '变更原因' },
|
|
|
- { colKey: 'h', title: '变更类型' },
|
|
|
- { colKey: 'i', title: '变更字段(多行)', minWidth: 120 },
|
|
|
- { colKey: 'j', title: '变更后内容(多行)', minWidth: 130 },
|
|
|
- { colKey: 'k', title: '提交人' },
|
|
|
- { colKey: 'l', title: '提交时间', width: 140 },
|
|
|
- { colKey: 'm', title: '流程状态' },
|
|
|
- { colKey: 'n', title: '当前节点' },
|
|
|
- { colKey: 'o', title: '节点负责人' },
|
|
|
+ // {
|
|
|
+ // colKey: 'row-select',
|
|
|
+ // type: 'multiple',
|
|
|
+ // width: 50,
|
|
|
+ // fixed: 'left',
|
|
|
+ // },
|
|
|
+ { colKey: 'code', title: '变更申请编号', minWidth: 120 },
|
|
|
+ { colKey: 'serviceName', title: '服务单元', minWidth: 80 },
|
|
|
+ { colKey: 'customTypeStr', title: '客户类型', width: 100 },
|
|
|
+ { colKey: 'customName', title: '客户名称', minWidth: 80 },
|
|
|
+ { colKey: 'crmNo', title: '项目单号' },
|
|
|
+ { colKey: 'crmName', title: '项目名称' },
|
|
|
+ { colKey: 'reason', title: '变更原因' },
|
|
|
+ { colKey: 'exchangeTypeStr', title: '变更类型' },
|
|
|
+ { colKey: 'createRealName', title: '提交人' },
|
|
|
+ { colKey: 'createTime', title: '提交时间', width: 140 },
|
|
|
+ { colKey: 'projectExchangeFlowStatusStr', title: '流程状态' },
|
|
|
+ { colKey: 'approveUsersName', title: '处理人' },
|
|
|
+ { colKey: 'flowTime', title: '处理时间' },
|
|
|
];
|
|
|
const fields = ref([
|
|
|
{
|
|
|
- prop: 'a',
|
|
|
+ prop: 'serviceId',
|
|
|
label: '服务单元',
|
|
|
type: 'select',
|
|
|
labelWidth: 100,
|
|
|
- colSpan: 4,
|
|
|
+ colSpan: 4.5,
|
|
|
+ cell: 'service',
|
|
|
},
|
|
|
{
|
|
|
- prop: 'b',
|
|
|
+ prop: 'createUserId',
|
|
|
label: '提交人',
|
|
|
type: 'select',
|
|
|
labelWidth: 100,
|
|
|
- colSpan: 4,
|
|
|
+ colSpan: 4.5,
|
|
|
+ cell: 'user',
|
|
|
},
|
|
|
{
|
|
|
- prop: 'c',
|
|
|
+ prop: 'type',
|
|
|
label: '变更类型',
|
|
|
type: 'select',
|
|
|
labelWidth: 100,
|
|
|
- colSpan: 4,
|
|
|
+ colSpan: 4.5,
|
|
|
+ options: dictToOptionList(PLAN_CHANGE_TYPE),
|
|
|
},
|
|
|
{
|
|
|
- prop: 'd',
|
|
|
+ prop: 'customType',
|
|
|
label: '客户类型',
|
|
|
type: 'select',
|
|
|
labelWidth: 100,
|
|
|
- colSpan: 4,
|
|
|
+ colSpan: 4.5,
|
|
|
+ options: dictToOptionList(CUSTOMER_TYPE),
|
|
|
},
|
|
|
{
|
|
|
- prop: 'e',
|
|
|
+ prop: 'flowStatus',
|
|
|
label: '流程状态',
|
|
|
type: 'select',
|
|
|
labelWidth: 100,
|
|
|
- colSpan: 4,
|
|
|
+ colSpan: 4.5,
|
|
|
+ options: dictToOptionList(FLOW_CHECK_STATUS),
|
|
|
},
|
|
|
{
|
|
|
type: 'buttons',
|
|
|
colSpan: 2,
|
|
|
- children: [{ type: 'button', text: '查询' }],
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ type: 'button',
|
|
|
+ text: '查询',
|
|
|
+ onClick: () => {
|
|
|
+ search();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- prop: 'f',
|
|
|
+ prop: 'customName',
|
|
|
label: '客户名称',
|
|
|
labelWidth: 100,
|
|
|
- colSpan: 4,
|
|
|
+ colSpan: 4.5,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'g',
|
|
|
+ prop: 'exchangeNo',
|
|
|
label: '变更申请编号',
|
|
|
labelWidth: 100,
|
|
|
- colSpan: 4,
|
|
|
+ colSpan: 4.5,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'h',
|
|
|
+ prop: 'time',
|
|
|
label: '提交时间',
|
|
|
type: 'daterange',
|
|
|
labelWidth: 100,
|
|
|
- colSpan: 8,
|
|
|
+ colSpan: 9,
|
|
|
},
|
|
|
]);
|
|
|
const params = reactive({
|
|
|
- a: '',
|
|
|
- b: '',
|
|
|
- c: '',
|
|
|
- d: '',
|
|
|
- e: '',
|
|
|
- f: '',
|
|
|
- g: '',
|
|
|
- h: [],
|
|
|
+ serviceId: '',
|
|
|
+ createUserId: '',
|
|
|
+ type: '',
|
|
|
+ customType: '',
|
|
|
+ flowStatus: '',
|
|
|
+ customName: '',
|
|
|
+ exchangeNo: '',
|
|
|
+ time: [],
|
|
|
+});
|
|
|
+const transParams = computed(() => {
|
|
|
+ return {
|
|
|
+ ...omit(params, 'time'),
|
|
|
+ startTime: params.time[0],
|
|
|
+ endTime: params.time[1],
|
|
|
+ };
|
|
|
});
|
|
|
|
|
|
const {
|
|
|
loading: tableLoading,
|
|
|
pagination,
|
|
|
tableData,
|
|
|
- fetchData,
|
|
|
+ search,
|
|
|
onChange,
|
|
|
-} = useFetchTable(getTableData);
|
|
|
+} = useFetchTable(planChangeList, { params: transParams });
|
|
|
</script>
|
|
|
|
|
|
<style></style>
|