zhangjie 1 年之前
父节点
当前提交
e4e4515ad0

+ 1 - 1
src/utils/filter.js

@@ -50,7 +50,7 @@ export function genderTypeFilter(val) {
 export function educationTypeFilter(val) {
   return EDUCATION_TYPE[val] || DEFAULT_FIELD;
 }
-export function timestampFilter(val, fmt = 'ss') {
+export function timestampFilter(val, fmt = 'mm') {
   // fmt: dd or yyyy-MM-dd
   const formats = {
     dd: 'yyyy-MM-dd',

+ 13 - 5
src/views/sop/sop-manage/sop-step/index.vue

@@ -37,7 +37,9 @@
               <t-form-item label="项目名称">{{ sop.crmName }}</t-form-item>
             </t-col>
             <t-col :span="3">
-              <t-form-item label="派单时间">{{ sop.beginTime }}</t-form-item>
+              <t-form-item label="派单时间">{{
+                timestampFilter(sop.beginTime)
+              }}</t-form-item>
             </t-col>
             <t-col :span="3">
               <t-form-item label="客户经理">{{
@@ -54,12 +56,12 @@
             </t-col>
             <t-col :span="3">
               <t-form-item label="考试开始时间" label-width="100px">{{
-                sop.examStartTime
+                timestampFilter(sop.examStartTime)
               }}</t-form-item>
             </t-col>
             <t-col :span="3">
               <t-form-item label="考试结束时间" label-width="100px">{{
-                sop.examEndTime
+                timestampFilter(sop.examEndTime)
               }}</t-form-item>
             </t-col>
             <t-col :span="3">
@@ -153,7 +155,7 @@ import {
   flowFormPropertiesApi,
 } from '@/api/sop';
 import { objCopy } from '@/utils/tool';
-// import bus from '@/utils/bus';
+import { timestampFilter } from '@/utils/filter';
 
 const props = defineProps({
   type: {
@@ -333,7 +335,13 @@ const curFormConfig = computed(() => {
     formProperty.forEach((field) => {
       // 区域协调人
       if (field.formId.startsWith('region_user') && !field.value) {
-        field.value = crmInfo.value.regionCoordinatorName;
+        field.value = crmInfo.value.regionCoordinatorId;
+        field.options = [
+          {
+            label: crmInfo.value.regionCoordinatorName,
+            value: crmInfo.value.regionCoordinatorId,
+          },
+        ];
       }
       // 实施工程师
       if (field.formId.startsWith('engineer_user')) {

+ 3 - 1
src/views/sop/sop-manage/sop-step/sop-step-dialog.vue

@@ -39,7 +39,9 @@ const props = defineProps({
 });
 
 const title = computed(() => {
-  return props.type === 'fill' ? 'SOP填报' : 'SOP新增';
+  if (props.type === 'fill') return 'SOP填报';
+  if (props.type === 'new') return 'SOP新增';
+  if (props.type === 'edit') return 'SOP编辑';
 });
 
 const stepConfirm = () => {