Ver Fonte

代码更新

qymljy há 2 anos atrás
pai
commit
4029187c62

+ 1 - 1
src/Form/QuotedPrice/edit.vue

@@ -266,7 +266,7 @@
             </el-col>
             <el-col  :span="24">
               <el-form-item label="折扣(%):" label-width="100px" prop="discountrate">
-                <el-input  v-model="form.discountrate" autocomplete="off" placeholder="请输入折扣" type="textarea" autosize></el-input>
+                <el-input  v-model="form.discountrate" autocomplete="off" placeholder="请输入0-100%" type="textarea" autosize></el-input>
               </el-form-item>
             </el-col>
             <el-col  :span="24">

+ 9 - 11
src/Form/projectChange/edit.vue

@@ -282,15 +282,19 @@ export default {
     },
     editBtn () {
       this.dialogFormVisible = true
-      console.log(this.data,"res项目商机数据")
       this.form = Object.assign({},this.form,this.data)
       this.form.province = [this.form.province,this.form.city,this.form.county]
       /*this.form.grade = parseInt(this.form.grade)*/
       if (this.form.brandname === ''){
         this.form.sa_brandid = ''
       }
-      this.form.tradefields = JSON.parse(this.form.tradefields)
-      console.log(this.form,"项目商机内容")
+      /*this.form.tradefields = JSON.parse(this.form.tradefields)*/
+
+      /*this.form.budgetary = this.form.budgetary !== 0 ? this.tool.formatAmount(this.form.budgetary,2):'' || ''
+      this.form.totalinvestment  ? this.form.totalinvestment = this.tool.formatAmount(this.form.totalinvestment,2):this.form.totalinvestment = ''
+      this.form.costofconstruction  ? this.form.costofconstruction = this.tool.formatAmount(this.form.costofconstruction,2):this.form.costofconstruction = ''
+      this.form.signamount_due  ? this.form.signamount_due = this.tool.formatAmount(this.form.signamount_due,2):this.form.signamount_due = ''*/
+
     },
     /*自动查重判断*/
     duplicateCheck(){
@@ -304,7 +308,7 @@ export default {
             "sa_projectid":this.form.sa_projectid
           },
         })
-        console.log(res,"查重结果")
+
         if (res.data.length !== 0){
           console.log("重复")
         }
@@ -337,8 +341,6 @@ export default {
     onSubmit(){
       if (this.form.signdate_due !== ''){
         const data = new Date(this.form.signdate_due)
-        console.log(data.getFullYear())
-        console.log(data.getMonth()+1)
         if (data.getMonth() +1 < 10){
           this.form.signdate_due = data.getFullYear() + '-0' + (data.getMonth() + 1)
         }else {
@@ -349,8 +351,6 @@ export default {
       }
       if (this.form.begdate_due !== ''){
         const data = new Date(this.form.begdate_due)
-        console.log(data.getFullYear())
-        console.log(data.getMonth()+1)
         if (data.getMonth() +1 < 10){
           this.form.begdate_due = data.getFullYear() + '-0' + (data.getMonth() + 1)
         }else {
@@ -361,8 +361,6 @@ export default {
       }
       if (this.form.enddate_due !== ''){
         const data = new Date(this.form.enddate_due)
-        console.log(data.getFullYear())
-        console.log(data.getMonth()+1)
         if (data.getMonth() +1 < 10){
           this.form.enddate_due = data.getFullYear() + '-0' + (data.getMonth() + 1)
         }else {
@@ -371,7 +369,7 @@ export default {
       }else {
         this.form.enddate_due = ''
       }
-      console.log(this.form,'form')
+
       /*this.form.tradefields[0] = this.form.tradefields
       console.log(this.form,'form')*/
       this.$refs['form'].validate(async (valid) => {

+ 2 - 2
src/HDrpManagement/orderManage/details/index.vue

@@ -30,8 +30,8 @@
             <el-select class="mt-10" v-model="value" placeholder="请选择" size="mini">
               <el-option
                 v-for="item in options"
-                :key="item.value"
-                :label="item.value"
+                :key="item.value "
+                :label="item.value + '-' + item.remarks"
                 :value="item.value">
                 <span style="float: left">{{ item.value }}</span>
                 <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>

+ 6 - 3
src/HDrpManagement/projectChange/index.vue

@@ -139,13 +139,16 @@
           {{scope.data.column.data.projecttype + '-' + scope.data.column.data.projecttype_remarks}}
         </div>
         <div v-else-if="scope.data.column.columnname == 'totalinvestment'">
-          <span>{{scope.data.column.data[[scope.data.column.columnname]] !== 0?tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2):'--'}}</span>
+          <span>{{scope.data.column.data[[scope.data.column.columnname]] ?tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2):'--'}}</span>
         </div>
         <div v-else-if="scope.data.column.columnname == 'costofconstruction'">
-          <span>{{scope.data.column.data[[scope.data.column.columnname]] !== 0?tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2):'--'}}</span>
+          <span>{{scope.data.column.data[[scope.data.column.columnname]] ?tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2):'--'}}</span>
+        </div>
+        <div v-else-if="scope.data.column.columnname == 'budgetary'">
+          <span>{{scope.data.column.data[[scope.data.column.columnname]] ?tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2):'--'}}</span>
         </div>
         <div v-else-if="scope.data.column.columnname == 'signamount_due'">
-          <span>{{scope.data.column.data[[scope.data.column.columnname]] !== 0?tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2):'--'}}</span>
+          <span>{{scope.data.column.data[[scope.data.column.columnname]] ?tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2):'--'}}</span>
         </div>
         <div v-else>
           {{scope.data.column.data[[scope.data.column.columnname]]?scope.data.column.data[[scope.data.column.columnname]]:'--'}}

+ 5 - 5
src/HDrpManagement/projectChange/modules/detail.vue

@@ -340,14 +340,14 @@ export default {
           /*{label:'项目地址',value:this.mainData.address},*/
           {label:'项目地址',value:`${this.mainData.province} - ${this.mainData.city} - ${this.mainData.county} - ${this.mainData.address}`},
           {label:'项目规模',value:this.mainData.scale ? this.mainData.scale : '--'},
-          {label:'项目预算(元)',value:this.mainData.budgetary ? this.mainData.budgetary : '--'},
-          {label:'总投资额(百万)',value:this.mainData.totalinvestment ? this.mainData.totalinvestment : '--'},
-          {label:'造价(百万)',value:this.mainData.costofconstruction ? this.mainData.costofconstruction : '--'},
+          {label:'项目预算(元)',value:this.mainData.budgetary ? this.tool.formatAmount(this.mainData.budgetary,2) : '--'},
+          {label:'总投资额(百万)',value:this.mainData.totalinvestment ? this.tool.formatAmount(this.mainData.totalinvestment,2) : '--'},
+          {label:'造价(百万)',value:this.mainData.costofconstruction ? this.tool.formatAmount(this.mainData.costofconstruction,2) : '--'},
           {label:'预计开工时间',value:this.mainData.begdate_due ? this.mainData.begdate_due : '--'},
           {label:'预计完工时间',value:this.mainData.enddate_due ? this.mainData.enddate_due : '--'},
 
           {label:'预计签约时间',value:this.mainData.signdate_due ? this.mainData.signdate_due : '--'},
-          {label:'预计签约金额(元)',value:this.mainData.signamount_due ? this.mainData.signamount_due : '--'},
+          {label:'预计签约金额(元)',value:this.mainData.signamount_due ? this.tool.formatAmount(this.mainData.signamount_due,2) : '--'},
           {label:'赢率',value:this.mainData.winrate ? this.mainData.winrate : '--'},
           {label:'领域',value:this.mainData.tradefield ? this.mainData.tradefield : '--'},
           {label:'品牌',value:this.mainData.brandname ? this.mainData.brandname : '--'},
@@ -450,7 +450,7 @@ export default {
         },
         {
           label:'预计签约金额(元)',
-          value: this.mainData.signamount_due
+          value: this.mainData.signamount_due  ? this.tool.formatAmount(this.mainData.signamount_due,2) : '--'
         },
       ]
     },

+ 12 - 20
src/HDrpManagement/projectChange/modules/modules/productSet/index.vue

@@ -157,7 +157,7 @@
             fixed="right"
             width="100">
           <template slot-scope="scope">
-            <p><span>{{scope.row.marketprice?scope.row.marketprice:'--'}}</span></p>
+            <p><span>{{scope.row.marketprice?tool.formatAmount(scope.row.marketprice,2):'--'}}</span></p>
           </template>
         </el-table-column>
         <el-table-column
@@ -190,7 +190,7 @@
       </el-table>
       <div style="margin-top:16px;">
         <div style="float: left">
-          <span>总金额(元):{{totalPrice}}</span>
+          <span>总金额(元):{{tool.formatAmount(totalPrice,2)}}</span>
         </div>
         <div style="float: right">
           <el-pagination
@@ -258,8 +258,6 @@ export default {
     },*/
 
     async listData(){
-      console.log(this.data,"data的数据")
-      console.log(this.data.discountrate)
       this.discountrate = Math.round((this.data.discountrate * 100) * 100) / 100
       this.totalPrice = 0
       this.params.content.sa_projectid = this.data.sa_projectid
@@ -340,16 +338,17 @@ export default {
     /*修改单价*/
     priceChange(val,index,data){
       if (val > data.marketprice){
-        data.price = data.marketprice
+        data.price = this.tool.formatAmount(data.marketprice,2)
       }else if(val < 0) {
         data.price = 0
       }else {
-        data.price = Math.round(val * 100)/100
+        data.price = this.tool.formatAmount(val ,2)
       }
-      data.amount = Math.round((data.price * data.qty)*100)/100
+      data.amount = this.tool.formatAmount(data.price * data.qty,2)
       this.$set(this.list,index,data)
       this.onChangePrice(data,data.price)
     },
+    /*执行修改数量*/
     async onChangQty(data,val){
       const res = await this.$api.requested({
         "id": 20221021145502,
@@ -370,6 +369,7 @@ export default {
       this.listData()
       this.$emit("productSetSuccess")
     },
+    /*执行修改单价*/
     async onChangePrice(data,val){
       const res = await this.$api.requested({
         "id": 20221021145502,
@@ -394,29 +394,21 @@ export default {
     async discountrateChange(val){
       if (val > 100){
         this.discountrate = 100
-      }else if(val < 1){
-        this.discountrate = 1
+      }else if(val < 0){
+        this.discountrate = 0
       }else {
         this.discountrate = Math.round(val * 100)/100
       }
-      console.log(this.data,"修改预计折扣")
-      this.discountrate = (this.discountrate / 100).toFixed(3)
+     /* this.discountrate = (this.discountrate / 100).toFixed(4)*/
       const res = await this.$api.requested({
         "id": 20230207090702,
         "content": {
           "sa_projectid": this.$route.query.id,
-          "discountrate": this.discountrate
+          "discountrate": (this.discountrate / 100).toFixed(4)
         },
       })
       this.tool.showMessage(res,()=>{
-        this.data.discountrate = this.discountrate
-
-       /* if (this.discountrate > 1){
-          this.discountrate = Math.round((this.data.discountrate) * 100) / 100
-        }else {
-          this.discountrate = Math.round((this.data.discountrate * 100) * 100) / 100
-        }*/
-
+        this.data.discountrate = this.discountrate / 100
         this.$emit("productSetSuccess")
         this.listData()
       })

+ 1 - 1
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -265,7 +265,7 @@
             </el-col>
             <el-col  :span="24">
               <el-form-item label="折扣(%):" label-width="100px" prop="discountrate">
-                <el-input  v-model="form.discountrate" autocomplete="off" placeholder="请输入折扣" type="textarea" autosize></el-input>
+                <el-input  v-model="form.discountrate" autocomplete="off" placeholder="请输入0-100%" type="textarea" autosize></el-input>
               </el-form-item>
             </el-col>
             <el-col  :span="24">