Parcourir la source

Merge remote-tracking branch 'origin/master'

ZaiZai il y a 1 an
Parent
commit
6c69768304

+ 2 - 2
src/layout/index.vue

@@ -1,8 +1,8 @@
 <template>
     <el-container class="hc-layout-box">
         <el-header class="hc-layout-header">
-            <div class="hc-layout-header-logo" :style="`width: ${isCollapse ? '90px' : '200px'};`" @click="logoClick">
-                <img id="logo-icon" :src="appLogoIcon" alt="">
+            <div class="hc-layout-header-logo" :style="`width: ${isCollapse ? '0px' : '200px'};`" @click="logoClick">
+                <!-- <img id="logo-icon" :src="appLogoIcon" alt=""> -->
                 <span v-show="!isCollapse" class="logo-name">计量系统</span>
             </div>
             <div class="header-top-collapse-bar" @click="collapseChange">

+ 48 - 8
src/views/debit-pay/admin/components/middlepay/addModal.vue

@@ -456,15 +456,55 @@ const containChangeTotalBlur = (row) => {
 //判断是否红色
 const isCanSave = ref(false)
 const addTableRowStyle = ({ row }) => {
-    let allMeterTotal = new BigNumber(row.allMeterTotal) //a 累计计量量
-    let changeTotal = new BigNumber(row.changeTotal) //b 变更后数量
-    //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
-    const isCompared = allMeterTotal.comparedTo(changeTotal)
-    if (isCompared === 1 || isCompared === null) {
-        isCanSave.value = true
-        return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
+
+    // let allMeterTotal = new BigNumber(row.allMeterTotal) //a 累计计量量
+    // let changeTotal = new BigNumber(row.changeTotal) //b 变更后数量
+    // //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
+    // const isCompared = allMeterTotal.comparedTo(changeTotal)
+    // if (isCompared === 1 || isCompared === null) {
+    //     isCanSave.value = true
+    //     return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
+    // } else {
+    //     isCanSave.value = false
+    // }
+
+    // 判断施工图数量是否大于合同数据
+    //      大于:如果超计= 1并且 划分=1
+    //          不显示红色,否则显示
+    //      小于:判断累计计量量是否大于变更后数量
+    //            大于: 如果超计=1 不变红
+    //                  不等于1则变红
+    //            小于:不变红
+    //施工图数量是否大于合同数据
+    let isBuildThanContract = row.isBuildThanContract
+    //是否超计
+    let isContractOver = row.isContractOver
+    //是否生成划分
+    let isCreateDivide = row.isCreateDivide
+
+    if (isBuildThanContract) {
+        if (isContractOver && isCreateDivide) {
+            isCanSave.value = false
+        } else {
+            isCanSave.value = true
+            return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
+        }
+
     } else {
-        isCanSave.value = false
+            let allMeterTotal = new BigNumber(row.allMeterTotal) //a 累计计量量
+            let changeTotal = new BigNumber(row.changeTotal) //b 变更后数量
+            //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
+            const isCompared = allMeterTotal.comparedTo(changeTotal)
+            if (isCompared === 1 || isCompared === null) {
+                if (isContractOver) {
+                    isCanSave.value = false
+                } else {
+                    isCanSave.value = true
+                    return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
+                }
+            } else {
+                isCanSave.value = false
+            }
     }
 }