Parcourir la Source

feat: 客服许可续期任务 - 列表提示&详情优化

zhengxy il y a 1 an
Parent
commit
fd4a3765db

+ 55 - 41
project/src/components/license/createTaskDrawer.vue

@@ -148,40 +148,47 @@ export default {
148 148
     },
149 149
     // 获取规则详情
150 150
     async handleGetDetail() {
151
-      const url = `${this.URL.BASEURL}${this.URL.license_renewalJobDetail}`
152
-      const params = {
153
-        rule_id: this.rule_id
154
-      }
155
-      const { data: res = {} } = await this.$axios.get(url, { params })
156
-      if (res && res.errno == 0) {
157
-        const { title = '', list = [] } = res.rst || {}
158
-        this.form.title = title
151
+      try {
152
+        this.loading = true
153
+        const url = `${this.URL.BASEURL}${this.URL.license_renewalJobDetail}`
154
+        const params = {
155
+          rule_id: this.rule_id
156
+        }
157
+        const { data: res = {} } = await this.$axios.get(url, { params })
158
+        if (res && res.errno == 0) {
159
+          const { title = '', list = [] } = res.rst || {}
160
+          this.form.title = title
159 161
 
160
-        const account_list = []
161
-        list.forEach(l => {
162
-          const crtIdx = account_list.findIndex(a => a.corpid === l.corpid)
163
-          if (crtIdx === -1){
164
-            account_list.push({
165
-              corpid: l.corpid,
166
-              userOptions: [],
167
-              user_id_res: [l.user_id],
168
-              user_list: [],
169
-            })
170
-          } else {
171
-            account_list[crtIdx].user_id_res.push(l.user_id)
172
-          }
173
-        })
174
-        this.form.account_list = [...JSON.parse(JSON.stringify(account_list))]
175
-        this.form.account_list.forEach(async (a, aIdx) => {
176
-          await this.$nextTick()
177
-          this.onChangeCorpid(a.corpid, aIdx)
178
-        })
179
-        await this.$nextTick()
180
-        this.form.account_list.forEach(async (a, aIdx) => {
162
+          const account_list = []
163
+          list.forEach(l => {
164
+            const crtIdx = account_list.findIndex(a => a.corpid === l.corpid)
165
+            if (crtIdx === -1){
166
+              account_list.push({
167
+                corpid: l.corpid,
168
+                userOptions: [],
169
+                user_id_res: [l.user_id],
170
+                user_list: [],
171
+              })
172
+            } else {
173
+              account_list[crtIdx].user_id_res.push(l.user_id)
174
+            }
175
+          })
176
+          this.form.account_list = [...JSON.parse(JSON.stringify(account_list))]
177
+          this.form.account_list.forEach(async (a, aIdx) => {
178
+            await this.$nextTick()
179
+            this.onChangeCorpid(a.corpid, aIdx)
180
+          })
181 181
           await this.$nextTick()
182
-          this.onChangeUserIdRes(account_list[aIdx].user_id_res, a.corpid, aIdx)
183
-        })
184
-        this.handleGetUserDetailByReslist(list)
182
+          this.form.account_list.forEach(async (a, aIdx) => {
183
+            await this.$nextTick()
184
+            this.onChangeUserIdRes(account_list[aIdx].user_id_res, a.corpid, aIdx)
185
+          })
186
+          this.handleGetUserDetailByReslist(list)
187
+        }
188
+      } catch (error) {
189
+        console.log(error)
190
+      } finally {
191
+        this.loading = false
185 192
       }
186 193
     },
187 194
     async handleGetUserDetailByReslist(list) {
@@ -194,16 +201,23 @@ export default {
194 201
       });
195 202
     },
196 203
     async handleGetAllList () {
197
-      const url = `${this.URL.BASEURL}${this.URL.warn_djuserList}`
198
-      const params = {
199
-        is_active: this.isDetail ? '' : 1,
200
-        sys_group_id: this.$cookie.getCookie('isSuperManage') == 1 ? sessionStorage.getItem('company_session_defaultCorp_level_1').toString() : '',
201
-      }
202
-      const { data: res = {} } = await this.$axios.get(url, { params })
203
-      if (res && res.errno == 0) {
204
-        this.corpOptions = [...res.rst]
204
+      try {
205
+        this.loading = true
206
+        const url = `${this.URL.BASEURL}${this.URL.warn_djuserList}`
207
+        const params = {
208
+          is_active: this.isDetail ? '' : 1,
209
+          sys_group_id: this.$cookie.getCookie('isSuperManage') == 1 ? sessionStorage.getItem('company_session_defaultCorp_level_1').toString() : '',
210
+        }
211
+        const { data: res = {} } = await this.$axios.get(url, { params })
212
+        if (res && res.errno == 0) {
213
+          this.corpOptions = [...res.rst]
214
+        }
215
+        return Promise.resolve()
216
+      } catch (error) {
217
+        console.log(error)
218
+      } finally {
219
+        this.loading = false
205 220
       }
206
-      return Promise.resolve()
207 221
     },
208 222
     onChangeCorpid(corpid, accountIdx) {
209 223
       this.form.account_list[accountIdx].corpid = corpid || ''

+ 8 - 0
project/src/components/license/index.vue

@@ -1,5 +1,13 @@
1 1
 <template>
2 2
   <div v-loading="loading" class="operatorGroup-wrap">
3
+    <div class="self-hint">
4
+      <i class="el-icon-message-solid" />
5
+      <div>
6
+        <p>许可续期仅可为购买过许可的客服续期</p>
7
+        <p>在系统提交续期任务后,仍然需要通过购买许可流程发送申请邮件以及付款</p>
8
+        <p>取消任务仅可取消还未支付的订单,已经支付的不可以取消,只能走退款流程</p>
9
+      </div>
10
+    </div>
3 11
     <div class="screenBox">
4 12
       <div class="filter-wrap">
5 13
         <!-- 任务名称 -->