duanshenglang 2 days ago
parent
commit
b26beb74a3

+ 1 - 1
lottery/WeCom.html

@@ -1057,7 +1057,7 @@
               this.clientData()
               this.getTaskList()
             }
-            this.memberName = data.memberName
+            this.memberName = data.memberName || ''
           } else {
             vant.Toast.fail(msg)
           }

+ 53 - 2
lottery/qw/clientGroupMassList.html

@@ -156,11 +156,23 @@
     line-height: 17px;
   }
 
+  .task_item_foot {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding-top: 8px;
+  }
   .task_item_time {
     font-size: 12px;
     color: #999999;
     line-height: 17px;
-    padding-top: 8px;
+  }
+  .task_item_btn {
+    font-size: 12px;
+    color: #4ed74e;
+    padding: 2px 8px;
+    border: 1px solid;
+    border-radius: 10px;
   }
 
   .notask {
@@ -218,6 +230,10 @@
 <body>
   <div id="box" class="box">
     <div class="page5">
+      <van-dialog v-model="showSend" title="通知成员发送" show-cancel-button :before-close="beforeClose" confirm-button-text="确定"
+        cancel-button-text="取消">
+        <div style="padding: 20px; text-align: center;">确认通知?</div>
+      </van-dialog>
       <div>
         <div class="client_top">
           <div class="client_top_box">
@@ -241,7 +257,10 @@
                 <div v-else-if="item.isNotify === 1" class="client_tag status1">已通知</div>
                 <div v-else-if="item.isNotify === 3" class="client_tag status2">创建中</div>
               </div>
-              <div class="task_item_time">创建时间:{{item.createdTime}}</div>
+              <div class="task_item_foot">
+                <div class="task_item_time">创建时间:{{item.createdTime}}</div>
+                <div class="task_item_btn" v-if="item.isNotify === 0" @click.stop="handleClientMassSend(item)">通知成员发送</div>
+              </div>
             </div>
           </div>
         </div>
@@ -272,6 +291,8 @@
         memberId: null,
         keyword: '',
         tableData: [],
+        showSend: false,
+        taskId: null,
       }
     },
     created() {
@@ -328,9 +349,39 @@
       handleClientMassDetail(item) {
         window.location.href = `clientGroupMassDetail.html?bId=${this.bId}&env=${this.env}&id=${item.id}`
       },
+      handleClientMassSend(item) {
+        this.taskId = item.id
+        this.showSend = true
+      },
       handleClientMass() {
         window.location.href = `clientGroupMass.html?bId=${this.bId}&env=${this.env}&memberId=${this.memberId}`
       },
+      beforeClose(action, done) {
+        if (action === 'confirm') {
+          const headers = new Headers()
+          headers.append('token', this.token)
+          headers.append('tenancyId', this.tenancyId)
+          headers.append('userId', this.userId)
+          fetch(this.httpUrl + `/scrm/v1/wxcp-group-send/m/notifyMemberSend?id=${this.taskId}`, {
+            method: 'GET',
+            headers: headers
+          }).then(res => {
+            return res.json()
+          }).then(result => {
+            let { data, code, msg } = result
+            if (code === 1) {
+              vant.Toast.success('通知成功')
+              this.initData()
+            } else {
+              vant.Toast.fail(msg)
+            }
+          }).finally(() => {
+            done()
+          })
+        } else {
+          done();
+        }
+      },
       timeFormat(time, format = 'yyyy-MM-dd hh:mm:ss') {
         if (time === undefined || time === '' || time === null) {
           return '/';

+ 1 - 2
lottery/qw/clientMassList.html

@@ -325,7 +325,6 @@
         this.initData()
       },
       handleClientMassDetail(item) {
-        console.log('1')
         window.location.href = `clientMassDetail.html?bId=${this.bId}&env=${this.env}&id=${item.id}`
       },
       handleClientMassSend (item) {
@@ -341,7 +340,7 @@
           headers.append('token', this.token)
           headers.append('tenancyId', this.tenancyId)
           headers.append('userId', this.userId)
-          fetch(this.httpUrl + `/scrm/v1/wxcp-group-send/m/notifyMemberSend?id=${this.taskId}`, {
+          fetch(this.httpUrl + `/scrm/v1/wxcp-send/m/notifyMemberSend?id=${this.taskId}`, {
             method: 'GET',
             headers: headers
           }).then(res => {

+ 2 - 0
lottery/qw/toDoTask.html

@@ -279,6 +279,8 @@
               console.log('完成', res);
             }
           });
+        } else if (this.taskType === 'CLIENT_SOP') {
+          window.location.href = `taskDetail.html?taskId=${item.businessId}&type=${item.type}&env=${this.env}&bId=${this.bId}`
         } else {
           window.location.href = `taskDetail.html?taskId=${item.todoTaskId}&type=${item.type}&env=${this.env}&bId=${this.bId}`
         }