Prechádzať zdrojové kódy

Merge branch 'mergeBranch' into redUrgent

qymljy 1 rok pred
rodič
commit
f9873f90f6

+ 14 - 23
src/HDrpManagement/contractManage/components/addContract.vue

@@ -838,9 +838,16 @@ export default {
             this.$refs.project.queryEnterpriseArchives()
           }
         }
-
+        if(this.payTypeData.length > 0){
+          this.payTypeData.forEach(item=>{
+            if (item.isdefault == 1){
+              this.form.paytype = item.label
+            }
+          })
+        }
       },
       immediate:true,
+
     },
 
   },
@@ -881,7 +888,6 @@ export default {
       'customername':'',
       'customerid':''
     }
-    this.payTypeList()
   },
   methods: {
     async onSubmit () {
@@ -1197,33 +1203,18 @@ export default {
           where: {condition: ""},
         }
       })
-      console.log(res,'res')
       this.payTypeData = res.data.map((item,index)=>{
-        /*if (item.point === '订单审核'){
-          return {
-            label:item.ruleno +  '\xa0  \xa0 \xa0 \xa0' + item.point + '\xa0  \xa0 \xa0 \xa0' + "立账额度" + (item.amountrate * 100) +'% ' + '\xa0  \xa0 \xa0 \xa0' + '后置天数' + item.days + '天',
-            value:item.ruleno +  '' + item.point + '' + "立账额度" + (item.amountrate * 100) +'% ' + '' + '后置天数' + item.days + '天',
-          }
-        }else {
-          return {
-            label:item.ruleno + '\xa0  \xa0 \xa0 \xa0' + item.point + '\xa0  \xa0 \xa0 \xa0' +  '后置天数' + item.days + '天',
-            value:item.ruleno + '' + item.point + '' +  '后置天数' + item.days + '天',
-          }
-        }*/
         return {
           label:item.ruleno + '-' + item.remarks,
-          value:item.ruleno + '-' + item.remarks
+          value:item.ruleno + '-' + item.remarks,
+          isdefault:item.isdefault
         }
-
       })
-     /* res.data.forEach((item,index)=>{
-        if (item.point === '订单审核'){
-          this.payTypeData[index] = item.ruleno + ' ' + item.point + ' ' + "立账额度" + (item.amountrate * 100) +'% ' + '后置天数' + item.days
-        }else {
-          this.payTypeData[index] = item.ruleno + ' ' + item.point + ' ' +  '后置天数' + item.days
+      this.payTypeData.forEach(item=>{
+        if (item.isdefault == 1){
+          this.form.paytype = item.label
         }
-      })*/
-      console.log(this.payTypeData,'处理后数据')
+      })
     },
     discountrateChange(){
       let discountrate = parseFloat(this.form.discountrate)

+ 17 - 22
src/HDrpManagement/projectChange/modules/modules/contract/components/add.vue

@@ -552,6 +552,16 @@ export default {
         this.contractType = type
         this.address = this.data.province + this.data.city + this.data.county + this.data.address
       }
+      if(this.payTypeData.length > 0){
+        this.payTypeData.forEach(item=>{
+          if (item.isdefault == 1){
+            this.form.paytype = item.label
+          }
+        })
+      }else {
+        this.payTypeList()
+      }
+
 
       // if (type == '居间') {
       //   this.$nextTick(() => {
@@ -722,33 +732,19 @@ export default {
           where: {condition: ""},
         }
       })
-      console.log(res,'res')
       this.payTypeData = res.data.map((item,index)=>{
-        /*if (item.point === '订单审核'){
-          return {
-            label:item.ruleno +  '\xa0  \xa0 \xa0 \xa0' + item.point + '\xa0  \xa0 \xa0 \xa0' + "立账额度" + (item.amountrate * 100) +'% ' + '\xa0  \xa0 \xa0 \xa0' + '后置天数' + item.days + '天',
-            value:item.ruleno +  '' + item.point + '' + "立账额度" + (item.amountrate * 100) +'% ' + '' + '后置天数' + item.days + '天',
-          }
-        }else {
-          return {
-            label:item.ruleno + '\xa0  \xa0 \xa0 \xa0' + item.point + '\xa0  \xa0 \xa0 \xa0' +  '后置天数' + item.days + '天',
-            value:item.ruleno + '' + item.point + '' +  '后置天数' + item.days + '天',
-          }
-        }*/
         return {
           label:item.ruleno + '-' + item.remarks ,
-          value:item.ruleno + '-' + item.remarks
+          value:item.ruleno + '-' + item.remarks,
+          isdefault:item.isdefault
         }
 
       })
-      /* res.data.forEach((item,index)=>{
-         if (item.point === '订单审核'){
-           this.payTypeData[index] = item.ruleno + ' ' + item.point + ' ' + "立账额度" + (item.amountrate * 100) +'% ' + '后置天数' + item.days
-         }else {
-           this.payTypeData[index] = item.ruleno + ' ' + item.point + ' ' +  '后置天数' + item.days
-         }
-       })*/
-      console.log(this.payTypeData,'处理后数据')
+      this.payTypeData.forEach(item=>{
+        if (item.isdefault == 1){
+          this.form.paytype = item.label
+        }
+      })
     },
     discountrateChange(){
       this.form.discountrate = Math.round(this.form.discountrate * 100)/100
@@ -764,7 +760,6 @@ export default {
   },
   mounted () {
     this.queryTag()
-    this.payTypeList()
   }
 }
 

+ 8 - 8
src/HDrpManagement/salerpriceData/modules/salerType.vue

@@ -41,7 +41,7 @@
             <div class="inline-15 mt-10">
               <exportFile  :param="param" :columns="tablecols" fileName="营销费用类型情况统计" :dataid="param.content.dataid"></exportFile>
             </div>
-  
+
             <fullScreen  domId="orderTypeFull" @onFull="onFull" @backFull="backFull"></fullScreen>
           </div>
         </div>
@@ -80,10 +80,10 @@
           </div>
         </div>
       </div>
-  
+
     </div>
   </template>
-  
+
   <script>
   import { Pie,G2,measureTextWidth } from '@antv/g2plot';
   import tableTemplate from '../components/table';
@@ -156,7 +156,7 @@
           this.listqueryid = res.listqueryid
           sessionStorage.setItem('total',res.total)
         }
-  
+
         if (this.type === '金额'){
           if (res.data[0].ratio[0]) this.totalamount = '¥'+this.tool.formatAmount(res.data[0].ratio[0].total/10000,2)+'万'
         }else {
@@ -208,6 +208,7 @@
           return {
             "totalamount": this.totalamount,//值
             "type": item.type,
+            "text": item.text,
             "rowindex": item.rowindex,
             "ratio": Math.round(((item.ratio * 100)*100)/100), //比例
             "value":item.value
@@ -232,7 +233,7 @@
           appendPadding: 10,
           data:this.chartData,
           angleField: 'ratio',
-          colorField: 'type',
+          colorField: 'text',
           radius: 1,
           innerRadius: 0.6,
           legend:{
@@ -240,7 +241,7 @@
             style:{
               marginLeft:'80px'
             }
-  
+
           },
           label:{
             /*type: 'inner',
@@ -394,7 +395,6 @@
     }
   }
   </script>
-  
+
   <style scoped>
   </style>
-