刘洋 9 meses atrás
pai
commit
21d3993bd1

+ 6 - 1
src/components/global/work-card/index.vue

@@ -10,7 +10,12 @@
         <div class="txt">实施工作证</div>
         <img
           :src="data.photoPath"
-          style="width: 220px; margin-top: 16px; margin-bottom: 16px"
+          style="
+            max-width: 220px;
+            max-height: 140px;
+            margin-top: 16px;
+            margin-bottom: 16px;
+          "
         />
         <div class="u-name">{{ data.name }}</div>
         <div class="u-info"> 认证编号:{{ data.code }} </div>

+ 1 - 1
src/config/constants.js

@@ -287,7 +287,7 @@ export const PROJECT_PROCESS = {
 export const STATISTICAL_DIMENSION = {
   BY_PERSON: '按人员统计',
   BY_SOP: '按sop统计',
-  BY_CRM: '按crm统计',
+  BY_CRM: '按派单统计',
   BY_CUSTOM: '按客户统计',
   BY_SUPPLIER: '按供应商统计',
 };

+ 4 - 1
src/views/resource-guard/person-guard/person-files/index.vue

@@ -141,6 +141,9 @@
         <template #roles="{ col, row }">
           {{ row[col.colKey].map((item) => item.roleName).join(',') }}
         </template>
+        <template #projectExperience="{ col, row }">
+          {{ (JSON.parse(row[col.colKey]) || []).join(';') }}
+        </template>
         <template #operate="{ row }">
           <div class="table-operations" @click.stop>
             <t-link
@@ -363,7 +366,7 @@ const columns = [
   },
   { colKey: 'authenticationStatus', title: '认证状态', cell: 'status' },
   { colKey: 'remark', title: '备注' },
-  { colKey: 'projectExperience', title: '备注' },
+  { colKey: 'projectExperience', title: '项目经验', width: 200 },
   {
     title: '管理',
     colKey: 'operate',

+ 44 - 21
src/views/service-unit/dispatch/dispatch-manage/allocation-dialog.vue

@@ -135,11 +135,15 @@ const props = defineProps({
   visible: Boolean,
   curRow: Object,
   fromSop: Boolean,
+  isCloud: {
+    type: Boolean,
+    default: false,
+  },
 });
 const requestInfo = ref({});
 const formRef = ref(null);
 const IS_CLOUD = computed(() => {
-  return props.curRow?.type === 'CLOUD_MARK_SOP_FLOW';
+  return props.isCloud || props.curRow?.type === 'CLOUD_MARK_SOP_FLOW';
 });
 const init = () => {
   return [
@@ -181,9 +185,15 @@ const getOptions = () => {
     crmDetailId: props.fromSop ? props.curRow?.crmDetailId : props.curRow?.id,
   }).then((res) => {
     requestInfo.value = res;
-    tableData.value[0].history = res.regionCoordinatorInfo.historicalList;
-    tableData.value[1].history = res.projectManagerInfo.historicalList;
-    tableData.value[2].history = res.engineerInfo.historicalList;
+    if (IS_CLOUD.value) {
+      tableData.value[0].history = res.regionCoordinatorInfo.historicalList;
+      tableData.value[1].history = res.projectManagerInfo.historicalList;
+      tableData.value[2].history = res.engineerInfo.historicalList;
+    } else {
+      tableData.value[0].history = res.projectManagerInfo.historicalList;
+      tableData.value[1].history = res.engineerInfo.historicalList;
+    }
+
     options1.value = [...(res.regionCoordinatorInfo.canChooseList || [])].map(
       (item) => {
         item.str = `${item.supplierName}_${item.name}_${item.mobileNumber}`;
@@ -212,23 +222,36 @@ const getOptions = () => {
   });
 };
 
-const tableData = ref([
-  {
-    roleName: '区域协调人',
-    history: [],
-    key: 'REGION_COORDINATOR',
-  },
-  {
-    roleName: '项目经理',
-    history: [],
-    key: 'PROJECT_MANAGER',
-  },
-  {
-    roleName: '工程师',
-    history: [],
-    key: 'ENGINEER',
-  },
-]);
+const tableData = IS_CLOUD.value
+  ? ref([
+      {
+        roleName: '区域协调人',
+        history: [],
+        key: 'REGION_COORDINATOR',
+      },
+      {
+        roleName: '项目经理',
+        history: [],
+        key: 'PROJECT_MANAGER',
+      },
+      {
+        roleName: '工程师',
+        history: [],
+        key: 'ENGINEER',
+      },
+    ])
+  : ref([
+      {
+        roleName: '项目经理',
+        history: [],
+        key: 'PROJECT_MANAGER',
+      },
+      {
+        roleName: '工程师',
+        history: [],
+        key: 'ENGINEER',
+      },
+    ]);
 const roleColumns = [
   { colKey: 'roleName', title: '角色', width: 120, cel: 'roleName' },
   { colKey: 'key', title: '人员', cell: 'key' },

+ 2 - 2
src/views/service-unit/dispatch/dispatch-manage/create-sop.vue

@@ -192,6 +192,7 @@
       v-model:visible="showAllocationDialog"
       :curRow="curRow"
       @success="fetchData"
+      :isCloud="isCloud"
     ></AllocationDialog>
   </my-drawer>
 </template>
@@ -216,8 +217,7 @@ import { dateFormat } from '@/utils/tool';
 import DynamicFormItem from '../../../sop/components/dynamic-form-item/index.vue';
 import { DialogPlugin, MessagePlugin } from 'tdesign-vue-next';
 import { cloneDeep } from 'lodash-es';
-import {  customerTypeFilter } from '@/utils/filter';
-
+import { customerTypeFilter } from '@/utils/filter';
 
 const uploadFailRule = (res) => {
   return res.error !== '无';

+ 15 - 15
src/views/sop/sop-manage/office-sop/index.vue

@@ -644,20 +644,20 @@ const fields = computed(() => {
         },
       },
     },
-    {
-      prop: 'dingPlan',
-      label: '打卡在时限内',
-      type: 'select',
-      labelWidth: 104,
-      colSpan: 6,
-      options: [
-        { value: true, label: '是' },
-        { value: false, label: '否' },
-      ],
-      attrs: {
-        clearable: true,
-      },
-    },
+    // {
+    //   prop: 'dingPlan',
+    //   label: '打卡在时限内',
+    //   type: 'select',
+    //   labelWidth: 104,
+    //   colSpan: 6,
+    //   options: [
+    //     { value: true, label: '是' },
+    //     { value: false, label: '否' },
+    //   ],
+    //   attrs: {
+    //     clearable: true,
+    //   },
+    // },
     {
       prop: 'buttons',
       colSpan: 4,
@@ -673,7 +673,7 @@ const params = reactive({
   crmUserId: '',
   crmName: '',
   sopNo: '',
-  dingPlan: '',
+  // dingPlan: '',
   formWidgetMetadataViewList: cloneDeep(originColumns),
   formWidgetMetadataConditionList: [],
   formWidgetMetadataOrderList: [],

+ 15 - 15
src/views/sop/sop-manage/student-sop/index.vue

@@ -649,20 +649,20 @@ const fields = computed(() => {
         },
       },
     },
-    {
-      prop: 'dingPlan',
-      label: '打卡在时限内',
-      type: 'select',
-      labelWidth: 104,
-      colSpan: 6,
-      options: [
-        { value: true, label: '是' },
-        { value: false, label: '否' },
-      ],
-      attrs: {
-        clearable: true,
-      },
-    },
+    // {
+    //   prop: 'dingPlan',
+    //   label: '打卡在时限内',
+    //   type: 'select',
+    //   labelWidth: 104,
+    //   colSpan: 6,
+    //   options: [
+    //     { value: true, label: '是' },
+    //     { value: false, label: '否' },
+    //   ],
+    //   attrs: {
+    //     clearable: true,
+    //   },
+    // },
     {
       prop: 'buttons',
       colSpan: 6,
@@ -678,7 +678,7 @@ const params = reactive({
   crmUserId: '',
   crmName: '',
   sopNo: '',
-  dingPlan: '',
+  // dingPlan: '',
   formWidgetMetadataViewList: cloneDeep(originColumns),
   formWidgetMetadataConditionList: [],
   formWidgetMetadataOrderList: [],

+ 2 - 1
src/views/work-hours/work-hours-manage/work-attendance/detail-dialog.vue

@@ -228,8 +228,9 @@ const columns = [
 
 const params = computed(() => {
   return {
-    sopNo: props.row.sopNo,
+    sopNo: props.row.sopNo || undefined,
     userId: props.row.userId,
+    serviceId: props.row.serviceUnitId,
   };
 });
 

+ 23 - 19
src/views/work-hours/work-hours-manage/work-statistics/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="work-statistics flex flex-col h-full">
     <div v-if="perm.BUTTON_Export" class="page-action">
-      <t-button theme="primary" @click="handleExport">
+      <t-button theme="primary" @click="exportFile">
         <template #icon><svg-icon name="export" color="#fff" /></template
         >导出统计结果
       </t-button>
@@ -12,6 +12,7 @@
           v-model="params[item.prop]"
           :filterParams="{ statusList: ['PUBLISH'] }"
           defaultSelect
+          @default-selected="search"
           :clearable="false"
         ></select-service-unit>
       </template>
@@ -78,11 +79,11 @@ const fields = ref([
     labelWidth: 80,
     colSpan: 6,
     options: dictToOptionList(STATISTICAL_DIMENSION),
-    attrs: {
-      onChange: () => {
-        search();
-      },
-    },
+    // attrs: {
+    //   onChange: () => {
+    //     search();
+    //   },
+    // },
   },
   {
     type: 'buttons',
@@ -92,24 +93,26 @@ const fields = ref([
         type: 'button',
         text: '搜索',
         onClick: () => {
-          search();
-        },
-      },
-      {
-        type: 'button',
-        text: '导出统计结果',
-        attrs: {
-          theme: 'success',
-        },
-        onClick: () => {
-          exportFile();
+          mixinSearch();
         },
       },
+      // {
+      //   type: 'button',
+      //   text: '导出统计结果',
+      //   attrs: {
+      //     theme: 'success',
+      //   },
+      //   onClick: () => {
+      //     exportFile();
+      //   },
+      // },
     ],
   },
 ]);
 const mixinSearch = () => {
-  search();
+  if (params.serviceId) {
+    search();
+  }
 };
 const params = reactive({
   serviceId: '',
@@ -226,7 +229,8 @@ const columns = computed(() => {
 // ];
 const { pagination, tableData, fetchData, search, onChange } = useFetchTable(
   workStatisticsListApi,
-  { params }
+  { params },
+  false
 );
 
 const handleExport = () => {