2
3
Преглед на файлове

前端: 初次登录提示合同待评价数目

baichengfei преди 4 години
родител
ревизия
fbf7e106bf
променени са 2 файла, в които са добавени 37 реда и са изтрити 0 реда
  1. 34 0
      src/dashoo.cn/frontend_web/src/pages/index.vue
  2. 3 0
      src/dashoo.cn/frontend_web/src/pages/login.vue

+ 34 - 0
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -566,12 +566,46 @@
       }
     },
     created () {
+      if (process.client) {
+        if (window.localStorage.getItem('firstContractInfoParams') === '1') {
+          this.firstLoginInfo()
+        }
+      }
       if (this.authUser.Profile.IsCompanyUser == 1) {
         this.$router.push('/oilsupplier/supplier') // 跳转到登录页
       }
       this.initDatas()
     },
     methods: {
+      firstLoginInfo () {
+        let _this = this
+        const params = {
+          categoryId: 'GFGL_CONTRACT',
+          parameterId: 'paramset',
+          parameterCode: 'isStartEva'
+        }
+        _this.$axios.get('paramset/get-param-by-cate', { params })
+          .then(res => {
+            console.log('配置的是否评价', res)
+            if (res.data === 'true') {
+              let contractNum = 20
+              this.$confirm('您有 ' + contractNum + ' 份合同待评价,请前往评价!', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning',
+                showCancelButton: false,
+                showConfirmButton: false,
+                center: true
+              }).then(() => {
+                console.log('不能点到的')
+              }).catch(() => {
+                if (process.client) {
+                  window.localStorage.setItem('firstContractInfoParams', '2') // 初次登录弹框
+                }
+              })
+            }
+          })
+      },
       confirmIsInvoice () {
         this.invoiceLoading = true
         let params = {

+ 3 - 0
src/dashoo.cn/frontend_web/src/pages/login.vue

@@ -477,6 +477,9 @@ export default class Login extends Vue {
             this.$router.push(this.$route.query.page || '/indexdqm')
           } else {
             this.$router.push(this.$route.query.page || '/')
+            if (process.client) {
+              window.localStorage.setItem('firstContractInfoParams', '1') // 初次登录弹框
+            }
           }
         }
       } catch (e) {