qymljy 1 год назад
Родитель
Сommit
20dd915e2b

+ 31 - 6
src/HDrpManagement/contractManage/components/priceDifference/addPriceDiff.vue

@@ -82,11 +82,11 @@
         </el-row>
       </div>
       <div class="fixed__btn__panel">
-        <el-button  size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
+        <el-button  size="small" @click="onClose" class="normal-btn-width inline-16" :disabled="loading">取 消</el-button>
         <el-button size="small" type="primary" :loading="loading" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
-    <el-dialog  :visible.sync="dialogTableVisible" append-to-body center width="780px">
+    <el-dialog  :visible.sync="dialogTableVisible" append-to-body center width="70%">
       <template slot="title">
         <span style="float: left" >居间费调整确认</span>
       </template>
@@ -114,8 +114,8 @@
         </template>
       </table-detail>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogTableVisible = false">取消</el-button>
-        <el-button type="primary" @click="dialogTableVisible = false">确定调整</el-button>
+        <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>
       </span>
     </el-dialog>
   </div>
@@ -134,7 +134,9 @@ export default {
       dialogTableVisible:false,
       agentVisible:false,
       loading:false,
-      tableHieght:'calc(100vh - 380px)',
+      adjustLoading:false,
+      adjustCancle:false,
+      tableHieght:'calc(100vh - 580px)',
       form:{
         "sa_contractid": 0,//合同id
         "sys_enterpriseid": "",//居间商id
@@ -260,7 +262,6 @@ export default {
       })
     },
     async onAdjust(data){
-      console.log(data,'data3333')
       this.adjustParam.content.sa_contractid = data.sa_contractid
       this.adjustParam.content.orderratio = data.orderratio
       this.adjustParam.content.ascription_contractid = data.ascription_contractid
@@ -286,6 +287,30 @@ export default {
       this.form.orderratio = ''
       this.$refs.form.resetFields()
       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.form.sys_enterpriseid,
+          "remarks":""
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.adjustLoading = false
+        this.loading = false
+        this.drawerFormVisible = false
+        this.dialogTableVisible = false
+        this.$emit('adjustSuccess')
+      })
+    },
+    adjustCancel(){
+      this.adjustLoading = false
+      this.loading = false
+      this.dialogTableVisible = false
     }
   },
   created() {

+ 4 - 1
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"></addPriceDiff>
+    <addPriceDiff ref="priceDiff" class="inline-16" :data="data" @adjustSuccess="adjustSuccess"></addPriceDiff>
     <table-detail  :layout="tablecols" :data="list" :custom="true" :width="true" :height="tableHieght">
       <template v-slot:customcol="scope" >
         <div v-if="scope.column.columnname == 'orderratio'">
@@ -85,6 +85,9 @@ export default {
       this.$refs.priceDiff.drawerFormVisible = true
       this.$refs.priceDiff.editBtn(data)
     },
+    adjustSuccess(){
+      this.listData(this.param.content.pageNumner = 1)
+    }
   },
   mounted() {
     this.listData()