Browse Source

Merge branch 'master' of http://139.196.39.194:9021/chenc/sen-yu-new-web

huxy 4 months ago
parent
commit
b4b740511d

+ 8 - 4
src/views/cost-allocation-total/costDetailDrawer.vue

@@ -235,7 +235,7 @@
             </a-col>
             <a-col :md="6" :sm="8" class="noprint">
               <a-form-model-item label="" prop="" >
-              <h4 style="color:blue;" v-if="color2<0.8">
+              <h4 style="color:blue;" v-if="color2>=0&&color2<0.8">
                 标记(B)
                 <!-- <span>(计算结果小于O.8 时,该标记是蓝色)</span> -->
               </h4>
@@ -616,7 +616,7 @@ export default {
             this.detailsPlanNum.rmbExportamount = this.$refs.unitTabs.sumInfo.exportedAmountRMB //表头-外销总价(¥)
             //调整表头格式
              this.adjustingHeader()
-           if(Number(oneData.syCostAllocationShipdetail[0].procesUnitPriceusd)>0){
+           if(oneData.syCostAllocationShipdetail.length!==0&&Number(oneData.syCostAllocationShipdetail[0].procesUnitPriceusd)>0){
             this.$refs.unitTabs.sumInfo.excludingTaxProcessing =this.$refs.unitTabs.sumInfo.shipProcesFees//出运不含税加工费-合计信息
              }else{
               this.$refs.unitTabs.sumInfo.excludingTaxProcessing =( this.$refs.unitTabs.sumInfo.shipProcesFees/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//出运不含税加工费
@@ -654,8 +654,12 @@ export default {
       this.detailsPlanNum.shuiemoney=( this.detailsPlanNum.shuiemoney==''|| !this.detailsPlanNum.shuiemoney)?0: this.detailsPlanNum.shuiemoney//运费税额
       this.detailsPlanNum.shortvalue=( this.detailsPlanNum.shortvalue==''|| !this.detailsPlanNum.shortvalue)?'': (this.detailsPlanNum.shortvalue).toFixed(2)//短出货值
       this.color1 = Number(this.detailsPlanNum.rmbExportamount)-Number(this.detailsPlanNum.fabriccostNotincludestax)-Number(this.detailsPlanNum.excipiencostNotincludestax)-Number(this.detailsPlanNum.rmbProcesscost)-Number(this.detailsPlanNum.rmbExpense)
-      this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
-      this.color2 = this.color2>0?this.color2:-this.color2
+      if(this.detailsPlanNum.usdTotalexportprice==0.00){
+        this.color2 = 0
+      }else{
+        this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
+      }
+      // this.color2 = this.color2>0?this.color2:-this.color2
     },
 
     openEnclosure(){

+ 2 - 2
src/views/cost-allocation-total/list.vue

@@ -344,9 +344,9 @@ export default {
       // 标记A
       var A =rmbExportamoun-fabriccostNotincludestax-excipiencostNotincludestax-rmbProcesscost-rmbExpense
       var B = A/usdTotalexportprice
-      B= B>0?B:-B
+      // B= B>0?B:-B
       item.signA = A<0?'red':''
-      item.signB = B<0.8?'blue':''
+      item.signB =(B>=0&&B<0.8)?'blue':''
       this.$forceUpdate()
     },
     cancelSumit(record){

+ 8 - 4
src/views/reportForms/cost-allocation-table.vue

@@ -223,7 +223,7 @@
             </a-col>
             <a-col :md="6" :sm="8" class="noprint">
               <a-form-model-item label="" prop="" >
-              <h4 style="color:blue;" v-if="color2<0.8">
+              <h4 style="color:blue;" v-if="color2>=0&&color2<0.8">
                 标记(B)
                 <!-- <span>(计算结果小于O.8 时,该标记是蓝色)</span> -->
               </h4>
@@ -593,7 +593,7 @@ export default {
             this.detailsPlanNum.rmbExportamount = this.$refs.unitTabs.sumInfo.exportedAmountRMB //表头-外销总价(¥)
              //调整表头格式
              this.adjustingHeader()
-           if(Number(oneData.syCostAllocationShipdetail[0].procesUnitPriceusd)>0){
+           if(oneData.syCostAllocationShipdetail.length!==0&&Number(oneData.syCostAllocationShipdetail[0].procesUnitPriceusd)>0){
             this.$refs.unitTabs.sumInfo.excludingTaxProcessing =this.$refs.unitTabs.sumInfo.shipProcesFees//出运不含税加工费-合计信息
              }else{
               this.$refs.unitTabs.sumInfo.excludingTaxProcessing =( this.$refs.unitTabs.sumInfo.shipProcesFees/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//出运不含税加工费
@@ -730,8 +730,12 @@ export default {
       this.detailsPlanNum.shuiemoney=( this.detailsPlanNum.shuiemoney==''|| !this.detailsPlanNum.shuiemoney)?0: this.detailsPlanNum.shuiemoney//运费税额
       this.detailsPlanNum.shortvalue=( this.detailsPlanNum.shortvalue==''|| !this.detailsPlanNum.shortvalue)?'': (this.detailsPlanNum.shortvalue).toFixed(2)//短出货值
       this.color1 = Number(this.detailsPlanNum.rmbExportamount)-Number(this.detailsPlanNum.fabriccostNotincludestax)-Number(this.detailsPlanNum.excipiencostNotincludestax)-Number(this.detailsPlanNum.rmbProcesscost)-Number(this.detailsPlanNum.rmbExpense)
-      this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
-      this.color2 = this.color2>0?this.color2:-this.color2
+      if(this.detailsPlanNum.usdTotalexportprice==0.00){
+        this.color2 = 0
+      }else{
+        this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
+      }
+      // this.color2 = this.color2>0?this.color2:-this.color2
     },
 
     //计算出运明细合计行