|
@@ -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
|