瀏覽代碼

合同差价,居间审核、反审核调整

qymljy 8 月之前
父節點
當前提交
5f7832f5b1

+ 33 - 26
src/HDrpManagement/contractManage/components/priceDifference/addPriceDiff.vue

@@ -97,7 +97,7 @@
         <span style="margin-left: 20px">调整后提成:<span style="color: red;margin-left: 10px">{{totaladjustrewardamount == 0?'¥ '+tool.formatAmount(0,2):'¥ '+tool.formatAmount(totaladjustrewardamount,2)}}</span></span>
         <span style="margin-left: 20px">差额:<span style="color: red;margin-left: 10px">{{totalsubamount == 0?'¥ '+tool.formatAmount(0,2):'¥ '+tool.formatAmount(totalsubamount,2)}}</span></span>
       </div>
-      <table-detail :layout="adjustTable" :data="adjustList" :custom="true" :width="true" :height="tableHieght">
+      <table-detail :layout="adjustTable" :data="adjustList" :custom="true" :width="true" :height="tableHieght" min-height="200px">
         <template v-slot:customcol="scope" >
           <div v-if="scope.column.columnname == 'rewardamount'">
             {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
@@ -115,7 +115,7 @@
       </table-detail>
       <span slot="footer" class="dialog-footer">
         <el-button @click="adjustCancel" class="normal-btn-width" size="small" :disabled="adjustLoading" >取消</el-button>
-        <el-button type="primary" @click="adjustClick" class="normal-btn-width" size="small" :loading="adjustLoading">确定调整</el-button>
+        <el-button type="primary" @click="adjustClick" class="normal-btn-width" size="small" :loading="adjustLoading">{{checkTitle?checkTitle:'确定调整'}}</el-button>
       </span>
     </el-dialog>
   </div>
@@ -125,7 +125,7 @@
 import selectAgentNew from '../selectAgentNew.vue'
 export default {
   name: "addPriceDiff",
-  props:["data"],
+  props:["data",'isCheck','checkTitle'],
   components:{selectAgentNew},
   data(){
     return {
@@ -206,7 +206,7 @@ export default {
   },
   methods:{
     addBtn(){
-      this.form.title = this.data.enterprisename + '/' + this.data.projectname + '_居间费'
+      this.form.title = this.$route.query.type == '经销项目' || this.$route.query.type == '直销项目'?this.data.projectname + '_居间费': this.data.enterprisename + '_居间费'
       this.form.ascription_contractid = this.data.sa_contractid
       this.form.sa_projectid = this.data.sa_projectid
       this.form.saler_hrid = this.data.saler_hrid
@@ -223,6 +223,7 @@ export default {
       }
     },
     editBtn(data){
+      console.log(data,'data222')
       this.title = '编辑居间协议'
       this.form.title = data.title
       this.form.sa_contractid = data.sa_contractid
@@ -234,6 +235,8 @@ export default {
       this.form.begdate = this.data.begdate
       this.form.enddate = this.data.enddate
       this.form.signdate = this.data.signdate
+      this.form.remarks = data.remarks
+      console.log(this.form.remarks,'remarks')
       this.ascription = {
         "ascription_title":this.data.title,
         "enterprisename":data.sys_enterpriseid == -1  ? '':data.enterprisename,
@@ -297,31 +300,35 @@ export default {
       this.form.remarks = ''
     },
     async adjustClick(){
-      this.adjustLoading = true
-      const res = await this.$api.requested({
-        "id": "20240828163204",
-        "content": {
-          "sa_contractid": this.adjustParam.content.sa_contractid,
-          "orderratio": this.adjustParam.content.orderratio,
-          "sys_enterpriseid":this.sys_enterpriseid,
-          "remarks":""
-        }
-      })
-      this.form.orderratio = (this.form.orderratio / 100).toFixed(4)
-      let res1 = await this.$api.requested({
-        "id": 20221121185302,
-        "content": this.form
-      })
-      if (res1.code == 0){
-        this.form.orderratio = Math.round((this.form.orderratio * 100)*100)/100
-      }
-      this.tool.showMessage(res,()=>{
-        this.adjustLoading = false
-        this.loading = false
+      if (this.isCheck){
+        this.adjustLoading = true
         this.drawerFormVisible = false
         this.dialogTableVisible = false
         this.$emit('adjustSuccess')
-      })
+      }else {
+        this.adjustLoading = true
+        const res = await this.$api.requested({
+          "id": "20240828163204",
+          "content": {
+            "sa_contractid": this.adjustParam.content.sa_contractid,
+            "orderratio": this.adjustParam.content.orderratio,
+            "sys_enterpriseid":this.sys_enterpriseid,
+            "remarks":this.form.remarks,
+            "title":this.form.title
+          }
+        })
+        if (res.code == 0){
+          this.adjustLoading = false
+        }
+        this.tool.showMessage(res,()=>{
+          this.adjustLoading = false
+          this.loading = false
+          this.drawerFormVisible = false
+          this.dialogTableVisible = false
+          this.$emit('adjustSuccess')
+        })
+      }
+
     },
     adjustCancel(){
       this.adjustLoading = false

+ 2 - 2
src/HDrpManagement/contractManage/components/priceDifference/index.vue

@@ -2,7 +2,7 @@
   <div>
     <el-input style="width:200px;" placeholder="输入搜索内容" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="mt-10 input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
-    <addPriceDiff ref="priceDiff" class="inline-16" :data="data" @adjustSuccess="adjustSuccess"></addPriceDiff>
+    <addPriceDiff ref="priceDiff" class="inline-16" :data="data" :isCheck="isCheck" @adjustSuccess="adjustSuccess" :checkTitle="checkTitle"></addPriceDiff>
     <table-detail  :layout="tablecols" :data="list" :custom="true" :width="true" :height="tableHieght" minHeight="200px">
       <template v-slot:customcol="scope" >
         <div v-if="scope.column.columnname == 'orderratio'">
@@ -48,7 +48,7 @@
 import addPriceDiff from "./addPriceDiff"
 export default {
   name: "index",
-  props:["data"],
+  props:["data","isCheck","checkTitle"],
   components:{addPriceDiff},
   data(){
     return {

+ 5 - 1
src/HDrpManagement/contractManage/components/reverseCheck.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-button size="mini" @click="submit" type="primary">反 审 核 </el-button>
-    <adjust v-show="false" ref="adjustRef" @adjustSuccess="onCheck"></adjust>
+    <adjust v-show="false" :isCheck="true" ref="adjustRef" @adjustSuccess="onCheck" checkTitle="确定反审核"></adjust>
   </div>
 </template>
 
@@ -44,7 +44,11 @@ export default {
           "sa_contractid": this.data.sa_contractid
         },
       })
+      if (res.code == 0){
+        this.$refs.adjustRef.$refs.priceDiff.adjustLoading = false
+      }
       this.tool.showMessage(res,() => {
+        this.$refs.adjustRef.$refs.priceDiff.adjustLoading = false
         this.$emit('onSuccess')
       })
     }

+ 5 - 1
src/HDrpManagement/contractManage/components/submitCheck.vue

@@ -2,7 +2,7 @@
   <div >
     <el-button  @click="submit" size="mini" slot="reference" type="primary" :disabled="data.status == '已过期'" v-if="data.status=='新建' && tool.checkAuth($route.name,'submit') && !disabled && data.status">提 交</el-button>
     <el-button @click="submit" size="mini" slot="reference" type="primary" v-if="data.status=='已提交' && tool.checkAuth($route.name,'check') && data.status">审 核</el-button>
-    <adjust v-show="false" ref="adjustRef" @adjustSuccess="onCheck"></adjust>
+    <adjust v-show="false" ref="adjustRef" @adjustSuccess="onCheck" :isCheck="true" checkTitle="确定审核"></adjust>
   </div>
 </template>
 
@@ -80,7 +80,11 @@ export default {
           "sa_contractid": this.data.sa_contractid
         },
       })
+      if (res.code == 0){
+        this.$refs.adjustRef.$refs.priceDiff.adjustLoading = false
+      }
       this.tool.showMessage(res,() => {
+        this.$refs.adjustRef.$refs.priceDiff.adjustLoading = false
         this.$emit('onSuccess')
       })
     }