zhangjie 1 жил өмнө
parent
commit
701ebcad2e

+ 4 - 4
src/api/resource-guard.js

@@ -70,15 +70,15 @@ export const personAllocateCancelSubmitSopApi = (crmNo) =>
     url: '/api/admin/user/archives/allocation/un_publish',
     params: { crmNo },
   });
-export const personAllocateFreeEngineerApi = (roleType) =>
+export const personAllocateFreeEngineerApi = (roleType, crmNo) =>
   request({
     url: '/api/admin/user/archives/allocation/free_engineer',
-    params: { roleType },
+    params: { roleType, crmNo },
   });
-export const personAllocateFreeCoordinatorApi = (serviceUnitId) =>
+export const personAllocateFreeCoordinatorApi = (serviceUnitId, crmNo) =>
   request({
     url: '/api/admin/user/archives/allocation/free_coordinator',
-    params: { serviceUnitId },
+    params: { serviceUnitId, crmNo },
   });
 
 // registration-query

+ 8 - 2
src/components/common/select-free-engineer/index.vue

@@ -32,6 +32,7 @@ const props = defineProps({
   modelValue: { type: [Number, String, Array], default: '' },
   type: { type: String, default: '' },
   unitId: { type: String, default: '' },
+  crmNo: { type: String, default: '' },
 });
 const isMultiple = computed(() => {
   const multiple = attrs.multiple;
@@ -44,10 +45,15 @@ const search = async () => {
 
   let res = null;
   if (props.type === 'REGION_COORDINATOR') {
-    res = await personAllocateFreeCoordinatorApi(props.unitId).catch(() => {});
+    res = await personAllocateFreeCoordinatorApi(
+      props.unitId,
+      props.crmNo
+    ).catch(() => {});
     if (!res) return;
   } else {
-    res = await personAllocateFreeEngineerApi(props.type).catch(() => {});
+    res = await personAllocateFreeEngineerApi(props.type, props.crmNo).catch(
+      () => {}
+    );
     if (!res) return;
   }
 

+ 30 - 28
src/views/resource-guard/person-guard/person-allocate/person-deploy-dialog.vue

@@ -2,31 +2,31 @@
   <my-dialog
     :visible="visible"
     header="调配"
-    :width="900"
+    :width="600"
     attach="body"
     :closeOnOverlayClick="false"
     @close="emit('update:visible', false)"
     @opened="dialogOpened"
   >
-    <t-form ref="formRef" :labelWidth="120">
-      <t-row :gutter="[0, 0]">
-        <t-col :span="4">
+    <t-form ref="formRef" :labelWidth="66" colon>
+      <t-row :gutter="[20, 0]">
+        <t-col :span="6">
           <t-form-item label="服务单元"
             >{{ formData.serviceUnitName }}
           </t-form-item>
         </t-col>
-        <t-col :span="4">
+        <t-col :span="6">
           <t-form-item label="项目单号">{{ formData.crmNo }} </t-form-item>
         </t-col>
-        <t-col :span="4">
+        <t-col :span="6">
           <t-form-item label="客户类型"
             >{{ customerTypeFilter(formData.customType) }}
           </t-form-item>
         </t-col>
-        <t-col :span="8">
+        <t-col :span="6">
           <t-form-item label="客户名称">{{ formData.customName }} </t-form-item>
         </t-col>
-        <t-col :span="4">
+        <t-col :span="6">
           <t-form-item label="服务档位">{{ formData.level }} </t-form-item>
         </t-col>
         <t-col :span="12">
@@ -40,7 +40,7 @@
           </t-form-item>
         </t-col>
         <t-col :span="12">
-          <t-form-item label="人员调配">
+          <t-form-item label="人员调配" labelAlign="top">
             <div>
               <t-table
                 size="small"
@@ -59,6 +59,7 @@
                     v-model="row.userIdList"
                     :type="row.roleType"
                     :unit-id="curRow.serviceUnitId"
+                    :crm-no="curRow.crmNo"
                     multiple
                     :min-collapsed-num="3"
                     :filterable="false"
@@ -78,26 +79,27 @@
                   </div>
                 </template>
               </t-table>
-            </div>
-          </t-form-item>
-          <t-form-item>
-            <div class="flex justify-between items-center" style="width: 100%">
-              <t-select v-model="selectedRoleId" @change="roleChange">
-                <t-option
-                  v-for="item in roleList"
-                  :key="item.id"
-                  :value="item.id"
-                  :label="item.name"
-                  :disabled="configRoleIds.includes(item.id)"
-                ></t-option>
-              </t-select>
-              <t-button
-                class="m-l-10px"
-                theme="primary"
-                :disabled="!selectedRole"
-                @click="toAddRole"
-                >添加</t-button
+              <div
+                class="flex justify-between items-center"
+                style="width: 100%; margin-top: 16px"
               >
+                <t-select v-model="selectedRoleId" @change="roleChange">
+                  <t-option
+                    v-for="item in roleList"
+                    :key="item.id"
+                    :value="item.id"
+                    :label="item.name"
+                    :disabled="configRoleIds.includes(item.id)"
+                  ></t-option>
+                </t-select>
+                <t-button
+                  class="m-l-10px"
+                  theme="primary"
+                  :disabled="!selectedRole"
+                  @click="toAddRole"
+                  >添加</t-button
+                >
+              </div>
             </div>
           </t-form-item>
         </t-col>

+ 1 - 1
src/views/resource-guard/person-guard/person-files/add-person-file-dialog.vue

@@ -377,7 +377,7 @@ const dialogOpened = async () => {
     photos.value = [];
   } else {
     areaInfo.value = [formData.province, formData.city, formData.area];
-    photos.value = [{ url: formData.basePhotoPath }];
+    photos.value = [{ url: props.curRow.basePhotoPreviewPath }];
   }
   getRoleList();
 };

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

@@ -291,7 +291,7 @@ const columns = [
   { colKey: 'education', title: '学历', cell: 'education' },
   { colKey: 'mobileNumber', title: '手机号', width: 120 },
   { colKey: 'email', title: '电子邮箱' },
-  { colKey: 'basePhotoPath', title: '底照', cell: 'photo', width: 120 },
+  { colKey: 'basePhotoPreviewPath', title: '底照', cell: 'photo', width: 120 },
   { colKey: 'supplierName', title: '供应商' },
   {
     colKey: 'archivesTime',