|
@@ -15,6 +15,8 @@
|
|
type="OFFICE_SOP_FLOW"
|
|
type="OFFICE_SOP_FLOW"
|
|
:originColumns="originColumns"
|
|
:originColumns="originColumns"
|
|
@change="metadataChange"
|
|
@change="metadataChange"
|
|
|
|
+ contentType="VIEW"
|
|
|
|
+ :fastOptionContent="formWidgetMetadataViewList"
|
|
></select-metadata>
|
|
></select-metadata>
|
|
<t-button variant="outline" @click="handleRefresh">
|
|
<t-button variant="outline" @click="handleRefresh">
|
|
<template #icon><svg-icon name="refresh" color="#262626" /></template>
|
|
<template #icon><svg-icon name="refresh" color="#262626" /></template>
|
|
@@ -40,6 +42,12 @@
|
|
<template #icon><svg-icon name="shrink" color="#262626" /></template>
|
|
<template #icon><svg-icon name="shrink" color="#262626" /></template>
|
|
缩小</t-button
|
|
缩小</t-button
|
|
>
|
|
>
|
|
|
|
+ <select-filter
|
|
|
|
+ :metadata="formWidgetMetadataViewList"
|
|
|
|
+ @confirm="filterConfirm"
|
|
|
|
+ type="CLOUD_MARK_SOP_FLOW"
|
|
|
|
+ contentType="SEARCH"
|
|
|
|
+ ></select-filter>
|
|
</div>
|
|
</div>
|
|
<SearchForm :fields="fields" :params="params" :search="search">
|
|
<SearchForm :fields="fields" :params="params" :search="search">
|
|
<template #service="{ item, params }">
|
|
<template #service="{ item, params }">
|
|
@@ -51,14 +59,20 @@
|
|
}"
|
|
}"
|
|
></select-service-unit>
|
|
></select-service-unit>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template #leadId="{ item, params }">
|
|
|
|
+ <select-type-user
|
|
|
|
+ v-model="params[item.prop]"
|
|
|
|
+ type="REGION_MANAGER"
|
|
|
|
+ ></select-type-user>
|
|
|
|
+ </template>
|
|
<template #buttons>
|
|
<template #buttons>
|
|
- <t-space :size="16">
|
|
|
|
|
|
+ <!-- <t-space :size="16">
|
|
<select-filter
|
|
<select-filter
|
|
:metadata="formWidgetMetadataViewList"
|
|
:metadata="formWidgetMetadataViewList"
|
|
@confirm="filterConfirm"
|
|
@confirm="filterConfirm"
|
|
- ></select-filter>
|
|
|
|
- <t-button theme="primary" @click="search">搜索</t-button>
|
|
|
|
- </t-space>
|
|
|
|
|
|
+ ></select-filter> -->
|
|
|
|
+ <t-button theme="primary" @click="search">搜索</t-button>
|
|
|
|
+ <!-- </t-space> -->
|
|
</template>
|
|
</template>
|
|
</SearchForm>
|
|
</SearchForm>
|
|
|
|
|
|
@@ -82,27 +96,6 @@
|
|
:selected-row-keys="selectedRowKeys"
|
|
:selected-row-keys="selectedRowKeys"
|
|
@select-change="selectChange"
|
|
@select-change="selectChange"
|
|
>
|
|
>
|
|
- <!-- <template #sopNo="{ col, row }">
|
|
|
|
- <more-content
|
|
|
|
- :content="row[col.colKey]"
|
|
|
|
- @action="editSopFlowHandle(row, 'view')"
|
|
|
|
- ></more-content>
|
|
|
|
- </template> -->
|
|
|
|
- <!-- <template #beginTime="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #examStartTime="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #examEndTime="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #flowCreateTime="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #flowUpdateTime="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template> -->
|
|
|
|
<template
|
|
<template
|
|
v-for="field in formWidgetMetadataViewList"
|
|
v-for="field in formWidgetMetadataViewList"
|
|
#[field.fieldId]="{ col, row }"
|
|
#[field.fieldId]="{ col, row }"
|
|
@@ -233,9 +226,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup name="OfficeSop">
|
|
<script setup name="OfficeSop">
|
|
-import { ref, reactive, computed } from 'vue';
|
|
|
|
|
|
+import { ref, reactive, computed, watch } from 'vue';
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
-import { sopListApi, sopBatchCancelApi } from '@/api/sop';
|
|
|
|
|
|
+import { sopListApi, sopBatchCancelApi, getSopFastOptionsApi } from '@/api/sop';
|
|
import { timestampFilter } from '@/utils/filter';
|
|
import { timestampFilter } from '@/utils/filter';
|
|
import SelectFilter from '../../components/select-filter/index.vue';
|
|
import SelectFilter from '../../components/select-filter/index.vue';
|
|
import SopSortPanel from '../../components/sop-sort-panel/index.vue';
|
|
import SopSortPanel from '../../components/sop-sort-panel/index.vue';
|
|
@@ -251,6 +244,7 @@ import { cloneDeep } from 'lodash-es';
|
|
import { CUSTOMER_TYPE, FLOW_STATUS } from '@/config/constants';
|
|
import { CUSTOMER_TYPE, FLOW_STATUS } from '@/config/constants';
|
|
import { dictToOptionList } from '@/utils/tool';
|
|
import { dictToOptionList } from '@/utils/tool';
|
|
import DeviceManageNew from '@/components/common/device-manage-new';
|
|
import DeviceManageNew from '@/components/common/device-manage-new';
|
|
|
|
+import { omit } from 'lodash-es';
|
|
const { perm } = usePermission();
|
|
const { perm } = usePermission();
|
|
|
|
|
|
const appStore = useAppStore();
|
|
const appStore = useAppStore();
|
|
@@ -259,8 +253,8 @@ const selectedRowKeys = ref([]);
|
|
const selectChange = (value) => {
|
|
const selectChange = (value) => {
|
|
selectedRowKeys.value = value;
|
|
selectedRowKeys.value = value;
|
|
};
|
|
};
|
|
-
|
|
|
|
-const originColumns = [
|
|
|
|
|
|
+const originColumns = ref([]);
|
|
|
|
+const defaultTableColumns = [
|
|
{ fieldId: 'serviceName', fieldTitle: '服务单元', width: 160, code: 'TEXT' },
|
|
{ fieldId: 'serviceName', fieldTitle: '服务单元', width: 160, code: 'TEXT' },
|
|
{ fieldId: 'sopNo', fieldTitle: 'SOP流水号', width: 200, code: 'TEXT' },
|
|
{ fieldId: 'sopNo', fieldTitle: 'SOP流水号', width: 200, code: 'TEXT' },
|
|
{ fieldId: 'crmNo', fieldTitle: '项目单号', width: 200, code: 'TEXT' },
|
|
{ fieldId: 'crmNo', fieldTitle: '项目单号', width: 200, code: 'TEXT' },
|
|
@@ -324,7 +318,10 @@ const originColumns = [
|
|
code: 'SINGLE_SELECT',
|
|
code: 'SINGLE_SELECT',
|
|
},
|
|
},
|
|
];
|
|
];
|
|
-const originFieldIds = originColumns.map((item) => item.fieldId);
|
|
|
|
|
|
+originColumns.value = cloneDeep(defaultTableColumns);
|
|
|
|
+const originFieldIds = computed(() => {
|
|
|
|
+ return originColumns.value.map((item) => item.fieldId);
|
|
|
|
+});
|
|
const columns = computed(() => {
|
|
const columns = computed(() => {
|
|
const defaultColumns = [
|
|
const defaultColumns = [
|
|
{
|
|
{
|
|
@@ -333,23 +330,6 @@ const columns = computed(() => {
|
|
width: 50,
|
|
width: 50,
|
|
fixed: 'left',
|
|
fixed: 'left',
|
|
},
|
|
},
|
|
- // { colKey: 'serviceName', title: '服务单元', width: 160 },
|
|
|
|
- // { colKey: 'sopNo', title: 'SOP流水号', width: 200 },
|
|
|
|
- // { colKey: 'crmNo', title: '项目单号', width: 200 },
|
|
|
|
- // { colKey: 'beginTime', title: '派单时间', width: 180 },
|
|
|
|
- // { colKey: 'customManagerName', title: '客户经理', width: 140 },
|
|
|
|
- // { colKey: 'customManagerTypeStr', title: '客户类型', width: 120 },
|
|
|
|
- // { colKey: 'customName', title: '客户名称', width: 140 },
|
|
|
|
- // { colKey: 'crmName', title: '项目名称', minWidth: 160 },
|
|
|
|
- // { colKey: 'productName', title: '实施产品', width: 120 },
|
|
|
|
- // { colKey: 'examStartTime', title: '考试开始时间', width: 180 },
|
|
|
|
- // { colKey: 'examEndTime', title: '考试结束时间', width: 180 },
|
|
|
|
- // { colKey: 'flowCreateName', title: '提交人', width: 140 },
|
|
|
|
- // { colKey: 'flowCreateTime', title: '提交时间', width: 180 },
|
|
|
|
- // { colKey: 'flowUpdateTime', title: '更新时间', width: 180 },
|
|
|
|
- // { colKey: 'statusStr', title: '流程状态', width: 120 },
|
|
|
|
- // { colKey: 'taskName', title: '流程节点', width: 160 },
|
|
|
|
- // { colKey: 'pendApproveName', title: '当前节点负责人', width: 140 },
|
|
|
|
{
|
|
{
|
|
title: '管理',
|
|
title: '管理',
|
|
colKey: 'operate',
|
|
colKey: 'operate',
|
|
@@ -378,16 +358,96 @@ const columns = computed(() => {
|
|
return defaultColumns;
|
|
return defaultColumns;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+const fastShowOptions = ref([]);
|
|
|
|
+const getFastShowOptions = () => {
|
|
|
|
+ getSopFastOptionsApi({
|
|
|
|
+ type: 'CLOUD_MARK_SOP_FLOW',
|
|
|
|
+ contentType: 'VIEW',
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ fastShowOptions.value = (res || []).map((item) => ({
|
|
|
|
+ ...item,
|
|
|
|
+ label: item.name,
|
|
|
|
+ value: item.id,
|
|
|
|
+ }));
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+getFastShowOptions();
|
|
const fields = ref([
|
|
const fields = ref([
|
|
{
|
|
{
|
|
prop: 'serviceId',
|
|
prop: 'serviceId',
|
|
label: '服务单元',
|
|
label: '服务单元',
|
|
type: 'select',
|
|
type: 'select',
|
|
- labelWidth: 70,
|
|
|
|
|
|
+ labelWidth: 104,
|
|
colSpan: 6,
|
|
colSpan: 6,
|
|
cell: 'service',
|
|
cell: 'service',
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ prop: 'leadId',
|
|
|
|
+ label: '大区经理',
|
|
|
|
+ labelWidth: 104,
|
|
|
|
+ colSpan: 6,
|
|
|
|
+ cell: 'leadId',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'customName',
|
|
|
|
+ label: '客户名称',
|
|
|
|
+ labelWidth: 104,
|
|
|
|
+ colSpan: 6,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'taskKey',
|
|
|
|
+ label: '当前节点',
|
|
|
|
+ type: 'select',
|
|
|
|
+ labelWidth: 104,
|
|
|
|
+ colSpan: 6,
|
|
|
|
+ options:
|
|
|
|
+ appStore
|
|
|
|
+ .getFlowDetailByType('CLOUD_MARK_SOP_FLOW')
|
|
|
|
+ ?.setupList?.map((item) => ({ value: item, label: item })) || [],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'crmUserId',
|
|
|
|
+ label: '客户经理',
|
|
|
|
+ labelWidth: 104,
|
|
|
|
+ colSpan: 6,
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ prop: 'crmName',
|
|
|
|
+ label: '项目名称',
|
|
|
|
+ labelWidth: 104,
|
|
|
|
+ colSpan: 6,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'sopNo',
|
|
|
|
+ label: 'sop号',
|
|
|
|
+ labelWidth: 104,
|
|
|
|
+ colSpan: 6,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'fastSearch',
|
|
|
|
+ label: '快捷搜索',
|
|
|
|
+ type: 'select',
|
|
|
|
+ labelWidth: 104,
|
|
|
|
+ colSpan: 6,
|
|
|
|
+ options: [],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'fastColumns',
|
|
|
|
+ label: '快捷显示',
|
|
|
|
+ type: 'select',
|
|
|
|
+ labelWidth: 104,
|
|
|
|
+ colSpan: 6,
|
|
|
|
+ options: fastShowOptions.value,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'eee',
|
|
|
|
+ label: '打卡在时限内',
|
|
|
|
+ type: 'select',
|
|
|
|
+ labelWidth: 104,
|
|
|
|
+ colSpan: 6,
|
|
|
|
+ options: [],
|
|
|
|
+ },
|
|
{
|
|
{
|
|
prop: 'buttons',
|
|
prop: 'buttons',
|
|
colSpan: 4,
|
|
colSpan: 4,
|
|
@@ -396,6 +456,13 @@ const fields = ref([
|
|
]);
|
|
]);
|
|
const params = reactive({
|
|
const params = reactive({
|
|
serviceId: '',
|
|
serviceId: '',
|
|
|
|
+ leadId: '',
|
|
|
|
+ customName: '',
|
|
|
|
+ taskKey: '',
|
|
|
|
+ crmUserId: '',
|
|
|
|
+ crmName: '',
|
|
|
|
+ sopNo: '',
|
|
|
|
+ eee: '',
|
|
formWidgetMetadataViewList: cloneDeep(originColumns),
|
|
formWidgetMetadataViewList: cloneDeep(originColumns),
|
|
formWidgetMetadataConditionList: [],
|
|
formWidgetMetadataConditionList: [],
|
|
formWidgetMetadataOrderList: [],
|
|
formWidgetMetadataOrderList: [],
|
|
@@ -403,9 +470,13 @@ const params = reactive({
|
|
});
|
|
});
|
|
const transParams = computed(() => {
|
|
const transParams = computed(() => {
|
|
let formWidgetMetadataViewList = params.formWidgetMetadataViewList.filter(
|
|
let formWidgetMetadataViewList = params.formWidgetMetadataViewList.filter(
|
|
- (item) => !originFieldIds.includes(item.fieldId)
|
|
|
|
|
|
+ (item) => !originFieldIds.value.includes(item.fieldId)
|
|
);
|
|
);
|
|
- return { ...params, formWidgetMetadataViewList, type: 'OFFICE_SOP_FLOW' };
|
|
|
|
|
|
+ return {
|
|
|
|
+ ...omit(params, ['fastSearch', 'fastColumns']),
|
|
|
|
+ formWidgetMetadataViewList,
|
|
|
|
+ type: 'OFFICE_SOP_FLOW',
|
|
|
|
+ };
|
|
});
|
|
});
|
|
const {
|
|
const {
|
|
loading: tableLoading,
|
|
loading: tableLoading,
|
|
@@ -423,7 +494,12 @@ const {
|
|
|
|
|
|
const formWidgetMetadataViewList = ref(cloneDeep(originColumns));
|
|
const formWidgetMetadataViewList = ref(cloneDeep(originColumns));
|
|
const metadataChange = (vals) => {
|
|
const metadataChange = (vals) => {
|
|
- formWidgetMetadataViewList.value = vals;
|
|
|
|
|
|
+ formWidgetMetadataViewList.value = vals.map((item) => {
|
|
|
|
+ if (item.options && typeof item.options === 'string') {
|
|
|
|
+ item.options = JSON.parse(item.options);
|
|
|
|
+ }
|
|
|
|
+ return item;
|
|
|
|
+ });
|
|
search();
|
|
search();
|
|
};
|
|
};
|
|
|
|
|
|
@@ -527,4 +603,8 @@ const toDeviceManage = (row) => {
|
|
curSopData.value = row;
|
|
curSopData.value = row;
|
|
showDeviceManage.value = true;
|
|
showDeviceManage.value = true;
|
|
};
|
|
};
|
|
|
|
+watch(originColumns, () => {
|
|
|
|
+ params.formWidgetMetadataViewList = cloneDeep(originColumns.value);
|
|
|
|
+ formWidgetMetadataViewList.value = cloneDeep(originColumns.value);
|
|
|
|
+});
|
|
</script>
|
|
</script>
|