Browse Source

修改数据残缺问题和运单查询

chenrui  2 years ago
parent
commit
79b9194344

+ 10 - 6
src/views/system/securityCheck/components/securityCheckHeader.vue

@@ -411,12 +411,16 @@ export default {
         : this.$route.params.levelId
         ? this.$route.params.levelId
         : this.$route.params.agentLevel
-      this.formData.searchText = this.$route.params.proxyId ? this.$route.params.proxyId : this.$route.params.agentCode
-      this.locationsDatacopy.forEach((element) => {
-        if (element.agentId == this.formData.searchText) {
-          this.formData.searchTexts = element.agentName
-        }
-      })
+      if (!this.withInputer) {
+        this.formData.searchText = this.$route.params.proxyId
+          ? this.$route.params.proxyId
+          : this.$route.params.agentCode
+        this.locationsDatacopy.forEach((element) => {
+          if (element.agentId == this.formData.searchText) {
+            this.formData.searchTexts = element.agentName
+          }
+        })
+      }
       // this.formData.agentLevel = this.$route.query.agentLevel;
       // this.formData.agentCode = this.$route.query.agentCode;
     }

+ 42 - 2
src/views/system/securityCheck/views/agentHome.vue

@@ -358,11 +358,51 @@ export default {
             },
           ]
         }
+        let datalist = [
+          {
+            no: 1,
+            risk: '普通',
+            num: 0,
+            kxsNum: 0,
+            yjNum: 0,
+            jyNum: 0,
+            fxNum: 0,
+          },
+          {
+            no: 2,
+            risk: '高风险',
+            num: 0,
+            kxsNum: 0,
+            yjNum: 0,
+            jyNum: 0,
+            fxNum: 0,
+          },
+          {
+            no: 3,
+            risk: '低风险',
+            num: 0,
+            kxsNum: 0,
+            yjNum: 0,
+            jyNum: 0,
+            fxNum: 0,
+          },
+        ]
+        result.data.forEach((element) => {
+          datalist.forEach((res) => {
+            if (res.risk == element.risk) {
+              res.num = element.num
+              res.kxsNum = element.kxsNum
+              res.yjNum = element.yjNum
+              res.jyNum = element.jyNum
+              res.fxNum = element.fxNum
+            }
+          })
+        })
         let count = 0
         let counts = 0
         let arr = []
         //获取总件数:
-        result.data.forEach((item) => {
+        datalist.forEach((item) => {
           count += item.num
           let obj = { value: item.num, name: item.risk }
           arr.push(obj)
@@ -389,7 +429,7 @@ export default {
           element.proportion = element.value / counts
           element.proportion = Math.floor(element.proportion * 100) ? Math.floor(element.proportion * 100) + '%' : '0%'
         })
-        result.data.forEach((res) => {
+        datalist.forEach((res) => {
           if (res.risk == '低风险') {
             let arr = res.yjNum + res.jyNum + res.fxNum
             if (res.yjNum) {

+ 60 - 2
src/views/system/securityCheck/views/cargoStatisticsHome.vue

@@ -551,8 +551,66 @@ export default {
             },
           ]
         }
+        let datalist = [
+          {
+            no: 1,
+            risk: '普通',
+            num: 0,
+            kxsNum: 0,
+            yjNum: 0,
+            jyNum: 0,
+            fxNum: 0,
+          },
+          {
+            no: 2,
+            risk: '高风险',
+            num: 0,
+            kxsNum: 0,
+            yjNum: 0,
+            jyNum: 0,
+            fxNum: 0,
+          },
+          {
+            no: 3,
+            risk: '严控',
+            num: 0,
+            kxsNum: 0,
+            yjNum: 0,
+            jyNum: 0,
+            fxNum: 0,
+          },
+          {
+            no: 4,
+            risk: '优先',
+            num: 0,
+            kxsNum: 0,
+            yjNum: 0,
+            jyNum: 0,
+            fxNum: 0,
+          },
+          {
+            no: 5,
+            risk: '低风险',
+            num: 0,
+            kxsNum: 0,
+            yjNum: 0,
+            jyNum: 0,
+            fxNum: 0,
+          },
+        ]
+        result.data.forEach((element) => {
+          datalist.forEach((res) => {
+            if (res.risk === element.risk) {
+              res.num = element.num
+              res.kxsNum = element.kxsNum
+              res.yjNum = element.yjNum
+              res.jyNum = element.jyNum
+              res.fxNum = element.fxNum
+            }
+          })
+        })
         //获取总件数:
-        result.data.forEach((item) => {
+        datalist.forEach((item) => {
           count += item.num
           let obj = { value: item.num, name: item.risk }
           arr.push(obj)
@@ -579,7 +637,7 @@ export default {
           element.proportion = element.value / counts ? element.value / counts : 0
           element.proportion = Math.floor(element.proportion * 100) + '%'
         })
-        result.data.forEach((res) => {
+        datalist.forEach((res) => {
           if (res.risk == '低风险') {
             let arr = res.yjNum + res.jyNum + res.fxNum
             if (res.risk) {

+ 1 - 1
src/views/system/securityCheck/views/waybillTable.vue

@@ -181,7 +181,7 @@ export default {
       riskClassification,
     } = queryData
     this.FormData = {
-      waybillNo: waybillNo,
+      waybillNo: '',
       destination: destination,
       agentCode: agentCode,
       agentLevel: agentLevel,