Explorar o código

增加跟进提交

Yannay hai 2 meses
pai
achega
4656543780
Modificáronse 1 ficheiros con 32 adicións e 1 borrados
  1. 32 1
      pages/pagereceivecenter/pagereceivecenter.vue

+ 32 - 1
pages/pagereceivecenter/pagereceivecenter.vue

@@ -16,7 +16,9 @@ export default {
16
             tagModalVisible: false,
16
             tagModalVisible: false,
17
             tagList: [],
17
             tagList: [],
18
             currentTags: [],
18
             currentTags: [],
19
-            currentOrder: {}
19
+            currentOrder: {},
20
+            followUpModelShow: false,
21
+            followUpNotes: '',
20
         }
22
         }
21
     },
23
     },
22
     onLoad() {
24
     onLoad() {
@@ -86,6 +88,9 @@ export default {
86
             } else if (btnType == 'willFollow') {
88
             } else if (btnType == 'willFollow') {
87
                 //待跟进
89
                 //待跟进
88
                 console.log('待跟进', order)
90
                 console.log('待跟进', order)
91
+                //打开模态窗
92
+                this.followUpModelShow = true;
93
+                this.currentOrder = order
89
             } else if (btnType == 'tag') {
94
             } else if (btnType == 'tag') {
90
                 //打标签
95
                 //打标签
91
                 console.log('打标签', order)
96
                 console.log('打标签', order)
@@ -100,6 +105,8 @@ export default {
100
             } else if (btnType == 'oneFollow') {
105
             } else if (btnType == 'oneFollow') {
101
                 //待跟进
106
                 //待跟进
102
                 console.log('待跟进', order)
107
                 console.log('待跟进', order)
108
+                this.followUpModelShow = true;
109
+                this.currentOrder = order
103
             }
110
             }
104
         },
111
         },
105
         // 跳转订单详情
112
         // 跳转订单详情
@@ -150,6 +157,21 @@ export default {
150
             //更新当前订单的标签
157
             //更新当前订单的标签
151
             this.currentOrder.tags = this.tagList.filter(tag => this.currentTags.includes(tag.id));
158
             this.currentOrder.tags = this.tagList.filter(tag => this.currentTags.includes(tag.id));
152
         },
159
         },
160
+
161
+        // 确认跟进细节按钮点击事件
162
+        async confirmFollowUp() {
163
+            console.log('确认跟进细节:', this.followUpNotes);
164
+            this.followUpModelShow = false;
165
+            // 可以在这里添加提交跟进细节的逻辑
166
+            // 未收的时候,提交一个跟进记录     待跟进_内容
167
+            const res = await uni.$u.api.addOrderFollow({
168
+                orderId: this.currentOrder.id,
169
+                content: `待跟进_${this.followUpNotes}`,
170
+            })
171
+            if (res.code == 200) {
172
+                uni.$u.toast('提交待跟进记录成功');
173
+            }
174
+        },
153
     }
175
     }
154
 }
176
 }
155
 </script>
177
 </script>
@@ -238,6 +260,15 @@ export default {
238
                 </u-checkbox-group>
260
                 </u-checkbox-group>
239
             </view>
261
             </view>
240
         </u-modal>
262
         </u-modal>
263
+
264
+        <u-modal :show="followUpModelShow" :title="'填写跟进细节'" :showConfirmButton="false">
265
+            <view class="modal-content">
266
+                <u--textarea v-model="followUpNotes" placeholder="请输入情况" confirm-type="done"
267
+                    style="width: 400rpx; margin-bottom: 30rpx;"></u--textarea>
268
+
269
+                <u-button type="primary" size="large" @click="confirmFollowUp">确认</u-button>
270
+            </view>
271
+        </u-modal>
241
     </view>
272
     </view>
242
 </template>
273
 </template>
243
 
274