Przeglądaj źródła

feat(contactList): 升级客户管理申请为批量申请功能

liujt 1 miesiąc temu
rodzic
commit
07312432c9
1 zmienionych plików z 6 dodań i 6 usunięć
  1. 6 6
      src/views/saleManage/contact/contactList.vue

+ 6 - 6
src/views/saleManage/contact/contactList.vue

@@ -61,10 +61,10 @@
               type="primary"
               class="ele-btn-icon"
               @click="addApply"
-              :disabled="selection?.length !== 1"
+              :disabled="selection?.length < 1"
               v-if="$hasPermission('eom:contactlistapply:apply')"
             >
-              申请
+              批量申请
             </el-button>
             <el-button
               type="primary"
@@ -539,8 +539,8 @@
         applySave({
           applyId: this.user.info.userId,
           applyName: this.user.info.name,
-          contactIds: this.selection[0].id,
-          contactNames: this.selection[0].name
+          contactIds: this.selection.map((v) => v.id).join(','),
+          contactNames: this.selection.map((v) => v.name).join(',')
         }).then((res) => {
           this.processSubmitDialogFlag = true;
           this.$nextTick(() => {
@@ -549,8 +549,8 @@
               businessKey: 'contact_list_apply',
               formCreateUserId: this.user.info.userId,
               variables: {
-                businessCode: this.selection[0].code,
-                businessName: this.selection[0].name,
+                businessCode: this.selection.map((v) => v.code).join(','),
+                businessName: this.selection.map((v) => v.name).join(','),
                 businessType: '客户名单申请'
               }
             };