Browse Source

合同调整

qymljy 1 year ago
parent
commit
4622abdbec

+ 51 - 25
src/HDrpManagement/contractManage/components/addContract.vue

@@ -506,7 +506,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="居间商:" prop="enterprisename">
+              <el-form-item label="居间商:" :rules="{ required: false, message: '请选择合作伙伴', trigger: 'change' }">
                 <el-popover
                   placement="bottom"
                   trigger="manual"
@@ -520,19 +520,19 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="项目合同:" prop="ascription_title">
+              <el-form-item label="合同:" prop="ascription_title">
                 <el-popover
                   placement="bottom"
                   trigger="manual"
-                  v-model="concratVisible"
+                  v-model="contractVisible"
                   width="600">
-                  <seleteProjectContract   ref="project" @onSelect="concratChange" @onCanel="concratVisible=false" ></seleteProjectContract>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('concratVisible')" v-model="form.ascription_title" placeholder="请选择项目合同"></el-input>
+                  <selectContract   ref="contractRef" @onSelect="concratChange" @onCanel="contractVisible=false" ></selectContract>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('contractVisible')" v-model="form.ascription_title" placeholder="请选择合同"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="项目名称:" prop="projectname">
+              <el-form-item label="项目名称:" prop="projectnum">
                 <el-input disabled type="text" size="small" v-model="form.projectname" placeholder="请选择项目"></el-input>
               </el-form-item>
             </el-col>
@@ -541,6 +541,11 @@
                 <el-input disabled type="text" size="small" v-model="form.projectnum" placeholder="项目编号"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="客户名称:" :rules="{ required: false, message: '请选择客户', trigger: 'change,blur' }">
+                <el-input disabled type="text" size="small" v-model="form.customername" placeholder="客户名称"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="业务员:" prop="salername">
                 <el-popover
@@ -577,7 +582,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="form.calculatemodel==2">
-              <el-form-item label="居间产品折扣(%):" prop="productdiscount">
+              <el-form-item label="居间产品折扣(%):" :rules="{ required: false, message: '请填写折扣', trigger: 'blur' }">
                 <el-input size="small" v-model="form.productdiscount" placeholder="请输入0-100%" @change="productdiscountChange"></el-input>
               </el-form-item>
             </el-col>
@@ -615,13 +620,14 @@ import selectPople from './selectSaler'
 import selectAgent from './selectAgent.vue'
 import seleteProject from './seleteProject'
 import seleteProjectContract from './seleteProjectContract'
+import selectContract from "@/HDrpManagement/contractManage/components/selectContract";
 import TimeSelect from './TimeSelect'
 import selectModel from './seleteModel'
 import seleteReceipt from './seleteReceipt'
 import selectSalesman from './selectSalesman'
 export default {
   name: '',
-  components:{selectPople,TimeSelect,seleteProject,selectAgent,selectModel,seleteProjectContract,seleteReceipt,selectSalesman},
+  components:{selectPople,TimeSelect,seleteProject,selectAgent,selectModel,seleteProjectContract,seleteReceipt,selectSalesman,selectContract},
   data () {
     var checkNumber = (rule, value, callback) => {
       if (typeof +value != 'number') {
@@ -658,7 +664,7 @@ export default {
       projectVisible:false,
       accountVisible:false,
       modelVisible:false,
-      concratVisible:false,
+      contractVisible:false,
       receiptVisible:false,
       salesmanVisible:false,
       modelList:[],
@@ -698,8 +704,9 @@ export default {
         "rec_contactsid":'',//收货联系人
         'phonenumber':'',
         'paytype':'',
-        'reminddays':''
-
+        'reminddays':'',
+        'customername':'',
+        'customerid':''
       },
       rules: {
         title: [
@@ -854,7 +861,9 @@ export default {
       "rec_contactsid":'',//收货联系人
       'phonenumber':'',
       'paytype':'',
-      'reminddays':''
+      'reminddays':'',
+      'customername':'',
+      'customerid':''
     }
     this.payTypeList()
   },
@@ -866,7 +875,7 @@ export default {
         if (val) {
           this.$store.commit('setLoading',true)
           /* 居间新建 */
-          if (this.$route.query.type == '居间') {
+          if (this.$route.query.type == '居间' && this.centerEnterpriseList) {
             let is = this.centerEnterpriseList.some(item => item.sys_enterpriseid == this.form.sys_enterpriseid)
             if (is) {
               this.$confirm('该项目商机已存在居间服务商,不可创建','提示',{
@@ -885,6 +894,7 @@ export default {
               } else {
                 this.form.type = this.$route.query.type
               }
+
               this.form.discountrate ? this.form.discountrate =  (this.form.discountrate / 100).toFixed(4) : ''
               this.form.productdiscount ? this.form.productdiscount =  (this.form.productdiscount / 100).toFixed(4) : ''
               this.form.orderratio ? this.form.orderratio =  (this.form.orderratio / 100).toFixed(4) : ''
@@ -898,9 +908,7 @@ export default {
                 this.form.orderratio = this.form.orderratio * 100
               }
               this.tool.showMessage(res,() => {
-
                 this.$store.commit('setLoading',false)
-                console.log(res.data);
                 this.$store.dispatch('DrawerShowChange',false)
                 this.$store.dispatch('changeDetailDrawer',true)
                 this.$router.push({path:'/contractDetail',query:{type:this.$route.query.type,id:res.data.sa_contractid,rowindex:res.data.rowindex}})
@@ -985,7 +993,7 @@ export default {
       this.projectVisible = false
       this.accountVisible = false
       this.modelVisible = false
-      this.concratVisible = false
+      this.contractVisible = false
       this.receiptVisible = false
       this.salesmanVisible = false
 
@@ -996,7 +1004,7 @@ export default {
       this.projectVisible = false
       this.accountVisible = false
       this.modelVisible = false
-      this.concratVisible = false
+      this.contractVisible = false
       this.receiptVisible = false
       this.salesmanVisible = false
       if (key === 'projectVisible'){
@@ -1018,8 +1026,8 @@ export default {
           this.$refs.form.validateField("enterprisename")
           this.$refs.form.validateField("sys_enterpriseid")
         }
-      }else if(key === 'concratVisible'){
-        this.$refs.project.queryEnterpriseArchives()
+      }else if(key === 'contractVisible'){
+        this.$refs.contractRef.queryProject(this.$refs.contractRef.projectParam.content.pageNumber = 1)
         key ? this[key] = true : ''
       }else if(key === 'salesmanVisible'){
         this.$refs.selectSalesman.listData(this.$refs.member.param.content.pageNumber = 1)
@@ -1043,10 +1051,26 @@ export default {
 
     },
     async querySalse(){
-      const res = await this.$api.requested(this.salsemanParam)
-      console.log("res",res)
-      this.form.salername = res.data[0].name
-      this.form.saler_hrid = res.data[0].hrid
+      if (this.form.customername){
+        let param = {
+          "id":20230305201202,
+          "content":{
+            "type":4,
+            "sys_enterpriseid":this.form.customerid,
+            "sa_projectid":'',
+          },
+        }
+        const res = await this.$api.requested(param)
+        console.log("res",res)
+        this.form.salername = res.data[0].name
+        this.form.saler_hrid = res.data[0].hrid
+      }else {
+        const res = await this.$api.requested(this.salsemanParam)
+        console.log("res",res)
+        this.form.salername = res.data[0].name
+        this.form.saler_hrid = res.data[0].hrid
+      }
+
     },
     salesmanChange(data){
       console.log(data,"业务员")
@@ -1094,12 +1118,14 @@ export default {
     concratChange (data) {
       console.log(data,"输出")
       this.centerEnterpriseList = data.parties
-      this.form.ascription_title = data.projectname
+      this.form.ascription_title = data.title
       this.form.ascription_contractid = data.sa_contractid
       this.form.projectname = data.projectname
       this.form.projectnum = data.projectnum
       this.form.sa_projectid = data.sa_projectid
-      this.concratVisible = false
+      this.form.customername = data.enterprisename
+      this.form.customerid = data.sys_enterpriseid
+      this.contractVisible = false
       this.salsemanParam.content.type = 2
       this.salsemanParam.content.sa_projectid = this.form.sa_projectid
       this.querySalse()

+ 53 - 23
src/HDrpManagement/contractManage/components/editContract.vue

@@ -509,33 +509,33 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="居间商:" prop="sys_enterpriseid">
+              <el-form-item label="居间商:" :rules="{ required: false, message: '请选择合作伙伴', trigger: 'change' }">
                 <el-popover
                   placement="bottom"
                   trigger="manual"
                   v-model="accountVisible"
                   width="400">
 
-                    <selectAgent ref="member" type="21"  :param="agentListPrams" :radio="true" @onSelect="centerChange" @onCancel="agentVisible = false"></selectAgent>
+                    <selectAgent ref="member" type="21"  :param="agentListPrams" :radio="true" @onSelect="centerChange" @onCancel="accountVisible = false"></selectAgent>
 
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('accountVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="项目合同:" prop="ascription_title">
+              <el-form-item label="合同:" prop="ascription_title">
                 <el-popover
                   placement="bottom"
                   trigger="manual"
-                  v-model="concratVisible"
+                  v-model="contractVisible"
                   width="600">
-                  <seleteProjectContract ref="projectContract" @onSelect="concratChange" @onCanel="concratVisible=false"></seleteProjectContract>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('concratVisible')" v-model="form.ascription_title"></el-input>
+                  <selectContract ref="contractRef" @onSelect="concratChange" @onCanel="contractVisible=false"></selectContract>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('contractVisible')" v-model="form.ascription_title"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="项目名称:" prop="sa_projectid">
+              <el-form-item label="项目名称:" prop="projectnum">
                 <el-input disabled type="text" size="small" v-model="form.projectname"></el-input>
               </el-form-item>
             </el-col>
@@ -544,6 +544,11 @@
                 <el-input disabled type="text" size="small" v-model="form.projectnum"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="客户名称:" :rules="{ required: false, message: '请选择客户', trigger: 'change,blur' }">
+                <el-input disabled type="text" size="small" v-model="form.customername" placeholder="客户名称"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="业务员:" prop="salername">
                 <el-popover
@@ -551,7 +556,8 @@
                     trigger="manual"
                     v-model="salesmanVisible"
                     width="500">
-                  <selectSalesman type="2" ref="selectSalesman" :sa_projectid="form.sa_projectid" :radio="true" @onSelect="salesmanChange" @onCancel="salesmanVisible = false"></selectSalesman>
+                  <selectSalesman v-if="form.customerid" type="4" ref="selectSalesman" :sys_enterpriseid="form.customerid" :radio="true" @onSelect="salesmanChange" @onCancel="salesmanVisible = false"></selectSalesman>
+                  <selectSalesman v-else type="2" ref="selectSalesman" :sa_projectid="form.sa_projectid" :radio="true" @onSelect="salesmanChange" @onCancel="salesmanVisible = false"></selectSalesman>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('salesmanVisible')" v-model="form.salername" placeholder="请选择业务员"></el-input>
                 </el-popover>
               </el-form-item>
@@ -580,7 +586,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="form.calculatemodel==2">
-              <el-form-item label="居间产品折扣(%):" prop="productdiscount">
+              <el-form-item label="居间产品折扣(%):" :rules="{ required: false, message: '请填写折扣', trigger: 'blur' }">
                 <el-input  size="small" v-model.number="form.productdiscount" placeholder="请输入0-100%" @change="productdiscountChange"></el-input>
               </el-form-item>
             </el-col>
@@ -616,6 +622,7 @@ import selectPople from './selectSaler'
 import selectAgent from './selectAgent'
 import seleteProject from './seleteProject'
 import selectModel from './seleteModel'
+import selectContract from "@/HDrpManagement/contractManage/components/selectContract";
 import TimeSelect from './TimeSelect'
 import seleteProjectContract from './seleteProjectContract'
 import seleteReceipt from './seleteReceipt'
@@ -626,7 +633,7 @@ import {mapGetters} from "vuex";
 export default {
   props:['data','disabled'],
   name: '',
-  components:{selectPople,TimeSelect,seleteProject,selectAgent,selectModel,seleteProjectContract,seleteReceipt,selectSalesman},
+  components:{selectPople,TimeSelect,seleteProject,selectAgent,selectModel,seleteProjectContract,seleteReceipt,selectSalesman,selectContract},
   data () {
     var checkNumber = (rule, value, callback) => {
       if (typeof +value != 'number') {
@@ -657,7 +664,7 @@ export default {
       projectVisible:false,
       accountVisible:false,
       modelVisible:false,
-      concratVisible:false,
+      contractVisible:false,
       receiptVisible:false,
       salesmanVisible:false,
       payTypeData:[],
@@ -694,7 +701,9 @@ export default {
         "rec_contactsid":'',//收货联系人
         'phonenumber':'',
         'paytype':'',
-        'reminddays':''
+        'reminddays':'',
+        'customername':'',
+        'customerid':''
       },
       rules: {
         title: [
@@ -829,6 +838,8 @@ export default {
       this.form.discountrate === 0 ? this.form.discountrate = '' : this.form.discountrate = Math.round((this.form.discountrate * 100) * 100)/100
       this.address = this.form.province + this.form.city + this.form.county + this.form.address
       this.form.salername = this.form.leader[0].name
+      this.form.customername = this.data.ascription_enterprisename
+      this.form.customerid = this.data.ascription_enterpriseid
       this.drawer = true
       this.$nextTick(() => {
         this.$refs.timeSelect.time = [this.form.begdate,this.form.enddate]
@@ -843,7 +854,7 @@ export default {
           this.$store.commit('setLoading',true)
           if(this.$route.query.type == '居间') {
             /* 当合同关系发生改变时 */
-            if (this.form.sys_enterpriseid != this.data.sys_enterpriseid || this.form.ascription_contractid != this.data.ascription_contractid) {
+            if (!this.form.sys_enterpriseid &&(this.form.sys_enterpriseid != this.data.sys_enterpriseid || this.form.ascription_contractid != this.data.ascription_contractid)) {
               /* 项目商机中是否存在该居间商 */
               let isChange = this.$refs.projectContract.ENlist
                 .find(item => item.sa_contractid == this.form.ascription_contractid).parties
@@ -946,7 +957,7 @@ export default {
       this.projectVisible = false
       this.accountVisible = false
       this.modelVisible = false
-      this.concratVisible = false
+      this.contractVisible = false
      /* key ? this[key] = true : ''
       if (key === 'projectVisible'){
         this.$refs.project.params.content.sys_enterpriseid = this.form.sys_enterpriseid
@@ -974,8 +985,8 @@ export default {
           this.$refs.form.validateField("enterprisename")
           this.$refs.form.validateField("sys_enterpriseid")
         }
-      }else if(key === 'concratVisible'){
-        this.$refs.project.queryEnterpriseArchives()
+      }else if(key === 'contractVisible'){
+        this.$refs.contractRef.queryProject(this.$refs.contractRef.projectParam.content.pageNumber = 1)
         key ? this[key] = true : ''
       }else if(key === 'salesmanVisible'){
         this.$refs.selectSalesman.listData(this.$refs.member.param.content.pageNumber = 1)
@@ -992,7 +1003,7 @@ export default {
       this.projectVisible = false
       this.accountVisible = false
       this.modelVisible = false
-      this.concratVisible = false
+      this.contractVisible = false
       this.receiptVisible = false
       this.salesmanVisible = false
       // this.$refs.form.resetFlieds()
@@ -1010,10 +1021,26 @@ export default {
       }
     },
     async querySalse(){
-      const res = await this.$api.requested(this.salsemanParam)
-      console.log("res",res)
-      this.form.salername = res.data[0].name
-      this.form.saler_hrid = res.data[0].hrid
+      if (this.form.customername){
+        let param = {
+          "id":20230305201202,
+          "content":{
+            "type":4,
+            "sys_enterpriseid":this.form.customerid,
+            "sa_projectid":'',
+          },
+        }
+        const res = await this.$api.requested(param)
+        console.log("res",res)
+        this.form.salername = res.data[0].name
+        this.form.saler_hrid = res.data[0].hrid
+      }else {
+        const res = await this.$api.requested(this.salsemanParam)
+        console.log("res",res)
+        this.form.salername = res.data[0].name
+        this.form.saler_hrid = res.data[0].hrid
+      }
+
     },
     salesmanChange(data){
       console.log(data,"业务员")
@@ -1063,6 +1090,7 @@ export default {
       this.form.enterprisename = data[0].enterprisename
       this.form.sys_enterpriseid = data[0].sys_enterpriseid
       this.agentVisible = false
+      this.accountVisible = false
     },
     modelChange (data) {
       this.form.modelname = data.modelname
@@ -1070,12 +1098,14 @@ export default {
       this.modelVisible = false
     },
     concratChange (data) {
-      this.form.ascription_title = data.projectname
+      this.form.ascription_title = data.title
       this.form.ascription_contractid = data.sa_contractid
       this.form.projectname = data.projectname
       this.form.projectnum = data.projectnum
       this.form.sa_projectid = data.sa_projectid
-      this.concratVisible = false
+      this.form.customername = data.enterprisename
+      this.form.customerid = data.sys_enterpriseid
+      this.contractVisible = false
       this.salsemanParam.content.type = 2
       this.salsemanParam.content.sa_projectid = this.form.sa_projectid
       this.querySalse()

+ 9 - 2
src/HDrpManagement/contractManage/components/productClassList/addProduct.vue

@@ -71,7 +71,7 @@ import Table from '@/components/table/index5'
 import previewImage from '@/components/previewImage/index'
 import uploadAllData from '@/components/uploadAllData/index'
 export default {
-  props:['disabled'],
+  props:['disabled','typeName'],
   name: '',
   components:{Table,previewImage,uploadAllData},
   data() {
@@ -122,7 +122,14 @@ export default {
     },
     addBtn () {
       this.drawer = true
-      this.getProductList()
+      this.params.content.pageNumber = 1
+      if (this.typeName === '居间'){
+        this.params.id = '20221124140102'
+        this.getProductList()
+      }else {
+        this.getProductList()
+      }
+
     },
     async getProductList () {
       this.params.content.sa_contractid = this.$route.query.id

+ 1 - 1
src/HDrpManagement/contractManage/components/productDetailList/productDetailList.vue

@@ -15,7 +15,7 @@
         ></uploadAllData>
         <el-button class="inline-16" size="small" v-if="tool.checkAuth($route.name,'productDetailManage') && data.status === '新建' && isLeader" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
         <addProduct v-if="tool.checkAuth($route.name,'productDetailManage') && data.status === '新建' && isLeader"
-                    class="inline-16"  :params="paramsAdd" :tablecolsAdd="tablecolsAdd" title="添加"
+                    class="inline-16"  :params="paramsAdd" :tablecolsAdd="tablecolsAdd" title="添加" :typeName="data.type"
                     @addSuccess="addProducts" @addProduct="addProduct" @uploadData="uploadData" @closeDrawer="closeDrawer"
                      ref="addProduct"
         ></addProduct>

+ 146 - 0
src/HDrpManagement/contractManage/components/selectContract.vue

@@ -0,0 +1,146 @@
+<template>
+  <div>
+    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+      <el-tab-pane label="项目合同" name="项目">
+        <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="projectParam.content.where.condition?projectParam.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="projectParam.content.where.condition" @keyup.native.enter="queryProject(projectParam.content.pageNumber = 1)" @clear="queryProject(projectParam.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+        </el-input>
+        <table-new-layout style="margin-top: 10px" :layout="projectTableCols" :data="projectList" :width="true" :custom="true" @rowClick="rowClick">
+          <template v-slot:customcol="scope">
+            <p>{{scope.column.data[scope.column.columnname]}}</p>
+          </template>
+        </table-new-layout>
+        <div class="container normal-panel" style="text-align:right">
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="100"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+      </el-tab-pane>
+      <el-tab-pane label="客户合同" name="客户">
+        <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="customerParam.content.where.condition?customerParam.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="customerParam.content.where.condition" @keyup.native.enter="queryCustomer(customerParam.content.pageNumber = 1)" @clear="queryCustomer(customerParam.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+        </el-input>
+        <table-new-layout style="margin-top: 10px" :layout="customerTableCols" :data="customerList" :width="true" :custom="true" @rowClick="rowClick">
+          <template v-slot:customcol="scope">
+            <p>{{scope.column.data[scope.column.columnname]}}</p>
+          </template>
+        </table-new-layout>
+        <div class="container normal-panel" style="text-align:right">
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="100"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "selectContract",
+  data() {
+    return {
+      activeName: '项目',
+      total:0,
+      currentPage:0,
+      projectParam:{
+        "id": 20221217145402,
+        "content": {
+          "nocache":true,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        }
+      },
+      projectList:[],
+      projectTableCols:[],
+      customerParam:{
+        "id": 20240509112704,
+        "content": {
+          "where":{
+            "condition":""
+          }
+        }
+      },
+      customerList:[],
+      customerTableCols:[],
+    };
+  },
+  methods: {
+    /*获取可选项目合同*/
+    async queryProject(){
+      const res = await this.$api.requested(this.projectParam)
+      this.projectList = res.data
+      this.currentPage = res.pageNumber
+      this.total = res.total
+    },
+    /*获取可选客户合同*/
+    async queryCustomer(){
+      const res = await this.$api.requested(this.customerParam)
+      this.customerList = res.data
+      this.currentPage = res.pageNumber
+      this.total = res.total
+    },
+    handleClick() {
+      if (this.activeName === '项目'){
+        this.projectParam.content.pageNumber = 1
+        this.queryProject()
+      }else {
+        this.customerParam.content.pageNumber = 1
+        this.queryCustomer()
+      }
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      if (this.activeName === '项目'){
+        this.projectParam.content.where.condition = ''
+        this.customerParam.content.where.condition = ''
+        this.projectParam.content.pageSize = val
+        this.queryProject()
+      }else {
+        this.projectParam.content.where.condition = ''
+        this.customerParam.content.where.condition = ''
+        this.customerParam.content.pageSize = val
+        this.queryCustomer()
+      }
+
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      if (this.activeName === '项目'){
+        this.projectParam.content.pageNumber = val
+        this.queryProject()
+      }else {
+        this.customerParam.content.pageNumber = val
+        this.queryCustomer()
+      }
+    },
+    rowClick(row){
+      console.log(row,'row')
+      this.$emit('onSelect',row)
+    }
+  },
+  created() {
+    this.projectTableCols = this.tool.tabelCol(this.$route.name).projectContractTable.tablecols
+    this.customerTableCols = this.tool.tabelCol(this.$route.name).customerContractTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 5 - 6
src/HDrpManagement/contractManage/modules/detail.vue

@@ -9,7 +9,7 @@
         idname="sa_contractid"
         typeTask="合同"
         ownertable="sa_contract"
-        :tabs="mainData.type === '项目' ? ['产品明细折扣','产品类别折扣','详细信息'] : mainData.type === '框架' ? ['产品明细折扣','产品类别折扣','业绩目标','详细信息'] : mainData.type === '居间' ? ['详细信息'] : mainData.type === '直销' ? ['产品明细折扣','产品类别折扣','业绩目标','详细信息'] : ['工具清单','详细信息']"
+        :tabs="mainData.type === '项目' ? ['产品明细折扣','产品类别折扣','详细信息'] : mainData.type === '框架' ? ['产品明细折扣','产品类别折扣','业绩目标','详细信息'] : mainData.type === '居间' ? ['产品明细折扣','产品类别折扣','详细信息'] : mainData.type === '直销' ? ['产品明细折扣','产品类别折扣','业绩目标','详细信息'] : ['工具清单','详细信息']"
 
         :statusCheck="[{key:'status',value:'已提交'},{key:'status',value:'审核'},{key:'status',value:'已终止'}]"
         @pageChange="pageChange"
@@ -70,7 +70,7 @@
           </template>
         </productBillno>
         <!--产品明细折扣表-->
-        <productDetailList :data="mainData" :isLeader="isLeader" ref="productDetailList" v-if="mainData.type == '框架' || mainData.type == '直销'"  @priceChange="queryMainData($route.query.id)" @closeDrawer="queryMainData($route.query.id)">
+        <productDetailList :data="mainData" :isLeader="isLeader" ref="productDetailList" v-if="mainData.type == '框架' || mainData.type == '直销' || mainData.type == '居间'"  @priceChange="queryMainData($route.query.id)" @closeDrawer="queryMainData($route.query.id)">
           <importFile
             v-if="tool.checkAuth($route.name,'exportProduct') && isLeader && mainData.status === '新建'"
             slot="export"
@@ -87,12 +87,11 @@
           <template v-slot:edit="scope">
           </template>
         </toolList>
-        <BaseInfo v-if="mainData.type == '居间'" :detailInfo="detailInfo"/>
       </div>
       <div slot="slot1" >
         <!--产品类别折扣表-->
-        <productClassList :data="mainData" :isLeader="isLeader" ref="classList" @priceChange="queryMainData($route.query.id)" v-if="mainData.type == '框架' || mainData.type == '直销'">
-          <addClass class="inline-16" v-if="tool.checkAuth($route.name,'productClassManage')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.classList.listData()"   ref="addProduct" @closeDrawer="closeDrawer"/>
+        <productClassList :data="mainData" :isLeader="isLeader" ref="classList" @priceChange="queryMainData($route.query.id)" v-if="mainData.type == '框架' || mainData.type == '直销' || mainData.type == '居间'">
+          <addClass class="inline-16" v-if="tool.checkAuth($route.name,'productClassManage')" :disabled="mainData.status != '新建' || !isLeader" :typeName="mainData.type" slot="addProduct" @onSuccess="$refs.classList.listData()"   ref="addProduct" @closeDrawer="closeDrawer"/>
           <template v-slot:edit="scope">
           </template>
         </productClassList>
@@ -149,7 +148,7 @@
           </template>
         </taskTarget>
 
-        <BaseInfo v-if="mainData.type !== '居间' && mainData.type !== '框架' && mainData.type !== '直销'" :detailInfo="detailInfo"/>
+        <BaseInfo v-if="mainData.type !== '框架' && mainData.type !== '直销'" :detailInfo="detailInfo"/>
       </div>
       <div slot="slot3">
         <BaseInfo v-if="mainData.type !== '居间'" :detailInfo="detailInfo"/>

+ 5 - 2
src/template/addProduct/index.vue

@@ -98,7 +98,7 @@ import uploadAllData from '@/components/uploadAllData/index'
 import previewImage from '@/components/previewImage/index'
 export default {
   name: "index",
-  props:["data","tradefield","discountrate","params","title","tablecolsAdd","sa_projectid","querySa_brandid"],
+  props:["data","tradefield","discountrate","params","title","tablecolsAdd","sa_projectid","querySa_brandid","typeName"],
   components:{tableTemp,uploadAllData,previewImage},
   data(){
     return {
@@ -134,6 +134,7 @@ export default {
     },
     /*可添加商品*/
     async listData(){
+      this.params.content.pageNumber = 1
       console.log(this.tradefield,'领域')
       if (this.data){
         switch (this.data.type) {
@@ -154,7 +155,9 @@ export default {
             break;
         }
       }
-
+      if (this.typeName === '居间'){
+        this.params.id = 20221124093602
+      }
       this.params.content.where.tradefield = this.tradefield
       const res = await this.$api.requested(this.params)
       this.list = res.data