Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy 2 years ago
parent
commit
34125ef585

+ 59 - 13
src/views/home/index.vue

@@ -18,8 +18,11 @@
             <span class="title-text">易粮易运大数据分析平台</span>
           </div>
         </div>
-        <div class="timers ">
-
+        <div class="btn">
+         <div :class="btnIndex==1?'activeBtn':''" @click="selectData(1)" class="btn-style">新季</div>
+         <div :class="btnIndex==2?'activeBtn':''" @click="selectData(2)" class="btn-style">历史</div>  
+        </div>
+        <div class="timers">
           {{ dateYear }} {{ dateWeek }} {{ dateDay }}
           <i class=" blq-icon-shezhi02" style="margin-left:10px" @click="showSetting"></i>
         </div>
@@ -134,6 +137,8 @@ export default {
   },
   data() {
     return {
+      dataListTimer:null,
+      btnIndex:1,
       MapList:[],
       rightBottomDataList:[],
       rightCenterDataList:[],
@@ -159,10 +164,33 @@ export default {
   created() {
   },
   mounted() {
-    gChartsData({
+    this.timeFn();
+    this.selectData(1)
+
+    this.dataListTimer = setInterval(() => {
+      this.selectData(1)
+      }, 30000);
+    
+
+  },
+  beforeDestroy() {
+    clearInterval(this.timing);
+    clearInterval(this.dataListTimer);
+    
+  },
+  methods: {
+    selectData(type){
+      let _seachMoth = ''
+      this.btnIndex = type
+      if(type==2){
+        _seachMoth = '2021-10-10'  
+      }else{
+        _seachMoth = '2022-10-10'  
+      }
+      gChartsData({
       compId: localStorage.getItem('ws-pf_compId'),
       loadingstatus: 1,
-      seachMoth: '2022-10-10'
+      seachMoth: _seachMoth
     }).toPromise().then(res => {
       console.log('··············', res)
       this.leftTopDataList = res[0].biViewInfoList
@@ -181,17 +209,11 @@ export default {
       this.rightCenterDataList = res[7].biViewInfoList
       this.rightBottomDataList = res[8].contractManagementInfos
       this.MapList =  res[3].biViewInfoList
-      this.timeFn();
+      
       this.cancelLoading();
       this.china_map();
-
     })
-
-  },
-  beforeDestroy() {
-    clearInterval(this.timing);
-  },
-  methods: {
+    },
     //中国地图
     china_map() {
       
@@ -532,7 +554,7 @@ export default {
       right: 11%;
       transform: rotate(180deg);
     }
-
+  
     .timers {
       position: absolute;
       right: 0;
@@ -546,6 +568,15 @@ export default {
         cursor: pointer;
       }
     }
+    .btn{
+      position: absolute;
+      left: 0;
+      top: 30px;
+      font-size: 18px;
+      display: flex;
+      align-items: center;
+      color:#fff;
+    }
   }
 
   .title {
@@ -917,4 +948,19 @@ export default {
 .row1 {
   display: flex
 }
+.btn-style{
+//   width: 70px;
+// height: 28px;
+background: rgba(47,108,233,0.2);
+border-radius: 4px;
+border: 1px solid rgba(0,220,255,0.2);
+padding: 5px 20px;
+box-sizing: border-box;
+font-size: 16px;
+margin-right: 10px;
+cursor:pointer
+}
+.activeBtn{
+  color:#06DBF1
+}
 </style>

+ 71 - 7
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -143,9 +143,11 @@
                 <div>容重(g/L)</div>
                 <div>价格(元/公斤)</div>
               </div>
+             
               <div class="right">
-                <div class="line"></div>
-                <div class="jt-style"></div>
+                <div class="jt-style1"></div>
+                <div class="line1"></div>
+                
                 <div v-for="(item1,index) in priceRZObj.detailList" :key="index">
                   <div class="item-style" v-if="item1.isShow">
                     <div v-if="item1.type!=4" class="item-style-title">
@@ -1219,7 +1221,6 @@ export default {
           }
         }
       } else {
-        //以容重定价
         return true
       }
 
@@ -1246,7 +1247,6 @@ export default {
     submit() {
       let isValidate = false
       isValidate = this.validate()
-
       if (isValidate) {
         this.makeTableList()
         this.baseInfoForm.details = []
@@ -1259,6 +1259,19 @@ export default {
           case '新增':
             isValidate = this.validate()
             if (isValidate) {
+              if (this.baseInfoForm.bulkDensityStandard == 1) {
+              //以容重另外校验
+               let inspect = this.check() //
+               if(inspect){
+                purchasePriceAdd(this.baseInfoForm)
+                .toPromise()
+                .then((response) => {
+                  // this.tableData = response.records
+                  this.isCountShow = false
+                })
+               }
+               
+            }else{
               purchasePriceAdd(this.baseInfoForm)
                 .toPromise()
                 .then((response) => {
@@ -1266,20 +1279,32 @@ export default {
                   this.isCountShow = false
                 })
             }
+            
+            }
             break
           case '编辑':
+          isValidate = this.validate()
              if (!this.baseInfoForm.bulkDensityStandard) {
               //以水分计算等级
               this.getEditCheckList()
-            }
-            isValidate = this.validate()
-            if (isValidate) {
+              if (isValidate) {
               purchasePriceEdit(this.baseInfoForm)
                 .toPromise()
                 .then((response) => {
                   this.isCountShow = false
                 })
             }
+            }else{
+               let inspect = this.check() //以容重另外校验
+               if(inspect && isValidate){
+                purchasePriceEdit(this.baseInfoForm)
+                .toPromise()
+                .then((response) => {
+                  // this.tableData = response.records
+                  this.isCountShow = false
+                })
+               }
+            }
             break
           case '审核中':
             // this.makePriceDataList()
@@ -1307,6 +1332,21 @@ export default {
         }
       }
     },
+    check(){
+      let that = this
+      for(let i = 0;i < this.baseInfoForm.detailPrints.length;i++){
+        if(!this.baseInfoForm.detailPrints[i].bulkDensityMin || !this.baseInfoForm.detailPrints[i].bulkDensityMax||!this.baseInfoForm.detailPrints[i].bulkDensityPrice){
+        that.$message.error('请输入容重和对应区间价格!')
+        return false
+        }
+       
+      if(Number(this.baseInfoForm.detailPrints[i].bulkDensityMin) > Number(this.baseInfoForm.detailPrints[i].bulkDensityMax)){
+        that.$message.error('请从左到右按大到小填写容重!')
+        return false
+      }
+      }
+      return true
+    },
     //审核
     audit(item, status, status2) {
       posthandle({
@@ -2129,6 +2169,20 @@ export default {
         );
         border-radius: 3px;
       }
+      .line1 {
+        position: absolute;
+        top: 72px;
+        width: 100%;
+        height: 5px;
+        margin-left:16px;
+        background: linear-gradient(
+          39deg,
+          #5878e8 0%,
+          #91b0f5 42%,
+          #e6eeff 100%
+        );
+        border-radius: 3px;
+      }
 
       .bottom-price {
         position: absolute;
@@ -2219,4 +2273,14 @@ export default {
 .white-bgc {
   background: white !important;
 }
+.jt-style1 {
+        position: absolute;
+        top: 64px;
+        width: 0px;
+        height: 0px;
+        // right: -15px;
+        border-right: 15px solid #5473e8;
+        border-top: 10px solid transparent;
+        border-bottom: 10px solid transparent;
+      }
 </style>

+ 3 - 0
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -489,6 +489,9 @@
         }, {
           value: '黑龙江中天昊元贸易有限公司',
           label: '黑龙江中天昊元贸易有限公司'
+        },{
+          value: '厦门建发物产有限公司',
+          label: '厦门建发物产有限公司'
         }],
         companyNameOptions: [{
           value: '黑龙江利润元粮食贸易有限公司',

+ 3 - 0
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -263,6 +263,9 @@
         }, {
           value: '黑龙江鑫满仓粮食贸易有限公司',
           label: '黑龙江鑫满仓粮食贸易有限公司'
+        },{
+          value: '厦门建发物产有限公司',
+          label: '厦门建发物产有限公司'
         }],
         companyNameOptions: [{
           value: '黑龙江中天昊元贸易有限公司',