Browse Source

合同新增差价tab,海盐居间协议审核反审核调整,业务员收入新增订单号字段和搜索

qymljy 1 year ago
parent
commit
feda659469

+ 4 - 2
src/HDrpManagement/contractManage/components/priceDifference/addPriceDiff.vue

@@ -200,7 +200,8 @@ export default {
       adjustCurrentPage:0,
       totalrewardamount:0,
       totaladjustrewardamount:0,
-      totalsubamount:0
+      totalsubamount:0,
+      sys_enterpriseid:''
     }
   },
   methods:{
@@ -265,6 +266,7 @@ export default {
       this.adjustParam.content.sa_contractid = data.sa_contractid
       this.adjustParam.content.orderratio = data.orderratio
       this.adjustParam.content.ascription_contractid = data.ascription_contractid
+      this.sys_enterpriseid = this.form.sys_enterpriseid?this.form.sys_enterpriseid:data.sys_enterpriseid
       const res = await this.$api.requested(this.adjustParam)
       this.adjustList = res.data
       this.adjustTotal = res.total
@@ -295,7 +297,7 @@ export default {
         "content": {
           "sa_contractid": this.adjustParam.content.sa_contractid,
           "orderratio": this.adjustParam.content.orderratio,
-          "sys_enterpriseid":this.form.sys_enterpriseid,
+          "sys_enterpriseid":this.sys_enterpriseid,
           "remarks":""
         }
       })

+ 29 - 0
src/HDrpManagement/contractManage/components/priceDifference/index.vue

@@ -20,6 +20,7 @@
       </template>
       <template v-slot:opreation="scope">
         <el-button type="text" @click="adjustClick(scope.data)">调整</el-button>
+        <el-button type="text" size="mini" @click="goDetail(scope.data)">详 情</el-button>
       </template>
     </table-detail>
     <div  class="container normal-panel" style="text-align:right;padding-bottom: 0!important;">
@@ -50,6 +51,8 @@ export default {
       list:[],
       currentPage:0,
       total:0,
+      pageTotal:0,
+      listqueryid:'',
       param:{
         "id": 20240829103004,
         "content": {
@@ -70,6 +73,9 @@ export default {
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      this.pageTotal = res.pageTotal
+      this.listqueryid = res.listqueryid
+      sessionStorage.setItem('total',res.total)
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
@@ -87,6 +93,29 @@ export default {
     },
     adjustSuccess(){
       this.listData(this.param.content.pageNumner = 1)
+      this.$emit('adjustSuccess')
+    },
+    goDetail(data){
+      sessionStorage.setItem('listqueryid',this.listqueryid)
+      sessionStorage.setItem('rowindexOld',data.rowindex)
+      sessionStorage.setItem('listqueryidOld',this.$route.query.listqueryid)
+      sessionStorage.setItem('contractId',this.$route.query.id)
+      sessionStorage.setItem('typeOld',this.$route.query.type)
+      sessionStorage.setItem('totalOld',this.total)
+      sessionStorage.setItem('total',this.total)
+      sessionStorage.setItem('isGo','1')
+      this.$store.dispatch('changeDetailDrawer',false)
+      setTimeout(()=>{
+        this.$router.push({path:'/contractDetail',
+          query:{
+            id:data.sa_contractid,
+            rowindex:data.rowindex,
+            listqueryid:this.listqueryid,
+            type:'居间',
+            fieldname:'sa_contract'
+          }})
+        this.$store.dispatch('changeDetailDrawer',true)
+      },500)
     }
   },
   mounted() {

+ 25 - 11
src/HDrpManagement/contractManage/components/reverseCheck.vue

@@ -1,14 +1,20 @@
 <template>
+  <div>
     <el-button size="mini" @click="submit" type="primary">反 审 核 </el-button>
+    <adjust v-show="false" ref="adjustRef" @adjustSuccess="onCheck"></adjust>
+  </div>
 </template>
 
 <script>
+import adjust from '../components/priceDifference/index'
 export default {
   props:['data'],
   name: '',
+  components:{adjust},
   data() {
     return {
-      checkVisible:false
+      checkVisible:false,
+      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid
     };
   },
   computed:{
@@ -22,18 +28,26 @@ export default {
       this.$confirm('确定反审核当前合同吗?','提示',{
         confirmButtonText:'确定',
         cancelButtonText:'取消'
-      }).then(async () => {
-        let res = await this.$api.requested({
-          "id": 20221212135402,
-          "content": {
-              "sa_contractid": this.data.sa_contractid
-          },
-        })
-        this.tool.showMessage(res,() => {
-          this.$emit('onSuccess')
-        })
+      }).then(() => {
+        if (this.siteid == 'HY' && this.$route.query.type == '居间'){
+          this.$refs.adjustRef.$refs.priceDiff.dialogTableVisible = true
+          this.$refs.adjustRef.$refs.priceDiff.onAdjust(this.data)
+        }else {
+          this.onCheck()
+        }
       })
     },
+    async onCheck(){
+      let res = await this.$api.requested({
+        "id": 20221212135402,
+        "content": {
+          "sa_contractid": this.data.sa_contractid
+        },
+      })
+      this.tool.showMessage(res,() => {
+        this.$emit('onSuccess')
+      })
+    }
   },
 };
 </script>

+ 32 - 28
src/HDrpManagement/contractManage/components/submitCheck.vue

@@ -2,17 +2,21 @@
   <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>
   </div>
 </template>
 
 <script>
+import adjust from '../components/priceDifference/index'
 export default {
   props:['data','disabled'],
   name: '',
+  components:{adjust},
   data() {
     return {
       checkVisible:false,
-      refresh:true
+      refresh:true,
+      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid
     };
   },
   computed:{
@@ -21,7 +25,7 @@ export default {
 
   },
   created() {
-    console.log('eeee',this.disabled);
+
   },
   methods: {
     submit () {
@@ -41,45 +45,45 @@ export default {
           })
         })
       } else {
-        console.log(this.data,'审核数据')
-        console.log(new Date(this.data.enddate))
-        console.log(new Date())
-        console.log(new Date() > new Date(this.data.enddate))
         if (new Date() > new Date(this.data.enddate)){
           this.$confirm('当前合同有效期已过期,是否确定继续审核?','提示',{
             confirmButtonText:'确定',
             cancelButtonText:'取消'
-          }).then(async () => {
-            let res = await this.$api.requested({
-              "id": 20221121203102,
-              "content": {
-                "type":1,//0:不通过,1:通过
-                "sa_contractid": this.data.sa_contractid
-              },
-            })
-            this.tool.showMessage(res,() => {
-              this.$emit('onSuccess')
-            })
+          }).then( () => {
+            if (this.siteid == 'HY' && this.$route.query.type == '居间'){
+              this.$refs.adjustRef.$refs.priceDiff.dialogTableVisible = true
+              this.$refs.adjustRef.$refs.priceDiff.onAdjust(this.data)
+            }else {
+              this.onCheck()
+            }
           })
         }else {
           this.$confirm('确定进行审核操作吗?','提示',{
             confirmButtonText:'确定',
             cancelButtonText:'取消'
-          }).then(async () => {
-            let res = await this.$api.requested({
-              "id": 20221121203102,
-              "content": {
-                "type":1,//0:不通过,1:通过
-                "sa_contractid": this.data.sa_contractid
-              },
-            })
-            this.tool.showMessage(res,() => {
-              this.$emit('onSuccess')
-            })
+          }).then( () => {
+            if (this.siteid == 'HY' && this.$route.query.type == '居间'){
+              this.$refs.adjustRef.$refs.priceDiff.dialogTableVisible = true
+              this.$refs.adjustRef.$refs.priceDiff.onAdjust(this.data)
+            }else {
+              this.onCheck()
+            }
           })
         }
       }
     },
+    async onCheck(){
+      let res = await this.$api.requested({
+        "id": 20221121203102,
+        "content": {
+          "type":1,//0:不通过,1:通过
+          "sa_contractid": this.data.sa_contractid
+        },
+      })
+      this.tool.showMessage(res,() => {
+        this.$emit('onSuccess')
+      })
+    }
   },
 };
 </script>

+ 9 - 1
src/HDrpManagement/contractManage/modules/detail.vue

@@ -178,7 +178,15 @@
         <BaseInfo v-if="(mainData.type !== '框架' && mainData.type !== '直销' && mainData.type !== '项目')" :detailInfo="detailInfo"/>
       </div>
       <div slot="slot3">
-        <BaseInfo v-if="mainData.type !== '居间'" :detailInfo="detailInfo"/>
+        <BaseInfo v-if="mainData.type !== '居间' && mainData.type !== '框架' && mainData.type !== '直销' " :detailInfo="detailInfo"/>
+        <div>
+          <!--   差价     -->
+          <priceDifference v-if="(mainData.type == '框架' || mainData.type == '直销') && siteid == 'HY' && tool.checkAuth($route.name,'brokerageFeeEntrySet')" :data="mainData"></priceDifference>
+          <BaseInfo v-else :detailInfo="detailInfo"/>
+        </div>
+      </div>
+      <div slot="slot4">
+        <BaseInfo  :detailInfo="detailInfo"/>
       </div>
     </basicDetails>
   </div>

+ 1 - 1
src/HDrpManagement/projectChange/modules/modules/contract/index.vue

@@ -151,7 +151,7 @@ export default {
                 rowindex:data.rowindex,
                 listqueryid:this.listqueryid,
                 type:type,
-                fieldname:'sa_contractid'
+                fieldname:'sa_contract'
               }})
             this.$store.dispatch('saveListData',{listData:this.list,param:this.params,pageTotal:this.pageTotal})
             return

+ 8 - 0
src/SDrpManagement/salerIncome/index.vue

@@ -39,6 +39,11 @@
               end-placeholder="结束日期">
           </el-date-picker>
         </div>
+        <div class="mt-10">
+          <label  class="search__label">订单号:</label>
+          <el-input  style="width:200px;" placeholder="搜索订单号" :suffix-icon="sonum?sonum.length > 0?'':'':'el-icon-search'" v-model="sonum" @keyup.native.enter="selectChange" @clear="selectChange" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+          </el-input>
+        </div>
       </template>
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname === 'remarks'">
@@ -68,6 +73,7 @@ export default {
   data(){
     return {
       status:'',
+      sonum:'',
       selectDate:[],
       tablecols:[],
     }
@@ -79,6 +85,8 @@ export default {
     },
     selectChange(){
       this.$refs.basicLayout.param.content.where.status = this.status
+      this.$refs.basicLayout.param.content.where.sonum = this.sonum
+      this.$refs.basicLayout.param.content.pageNumner = 1
       if (this.selectDate){
         this.$refs.basicLayout.param.content.where.begdate = this.selectDate[0]
         this.$refs.basicLayout.param.content.where.enddate = this.selectDate[1]

+ 33 - 4
src/components/normal-basic-layout-new/drawerDetail/drawer.vue

@@ -37,8 +37,13 @@ export default {
   },
   methods:{
     closeDrawer (done) {
-      console.log(this.historyRouter,'historyRouter')
+      let contractId = sessionStorage.getItem('contractId')
+      console.log(this.historyRouter,'historyRouter11111')
+      console.log(contractId,'contractId')
       if (this.historyRouter) {
+        console.log('11111')
+        let contractId = sessionStorage.getItem('contractId')
+        console.log(contractId,'contractId')
         if (this.$route.query.isPredicion){
 
           if (this.$route.query.isDetail){
@@ -67,9 +72,33 @@ export default {
         }
 
       } else {
-
-        this.$store.dispatch('changeDetailDrawer',false)
-        this.$router.go(-1)
+        console.log(contractId,'contractId')
+        let contractId = sessionStorage.getItem('contractId')
+        console.log(contractId,'contractId')
+        if (contractId && contractId != 'null'){
+          console.log('执行了111')
+          let rowindexOld = sessionStorage.getItem('rowindexOld')
+          let listqueryidOld = sessionStorage.getItem('listqueryidOld')
+          let typeOld = sessionStorage.getItem('typeOld')
+          this.$store.dispatch('changeDetailDrawer',true)
+          setTimeout(()=>{
+            this.$router.push({path:'/contractDetail',
+              query:{
+                id:contractId,
+                rowindex:rowindexOld,
+                listqueryid:listqueryidOld,
+                type:typeOld,
+                fieldname:'sa_contractid'
+              }})
+            /*this.$store.dispatch('saveListData',{listData:this.list,param:this.param,pageTotal:this.pageTotal})*/
+            sessionStorage.setItem('contractId',null)
+            this.$store.dispatch('changeDetailDrawer',true)
+          },500)
+        }else {
+          console.log('执行失败了')
+          this.$store.dispatch('changeDetailDrawer',false)
+          this.$router.go(-1)
+        }
       }
     }
   },

+ 2 - 1
src/components/normal-basic-layout/details/index.vue

@@ -24,7 +24,7 @@
           <el-button v-if="tool.checkAuth($route.name,'delete') && delApiId" :type="checkDisabled()?'':'primary'" class="inline-16" size="mini" :disabled="checkDisabled()" @click="deleteData">删 除</el-button>
          <div v-if="!pageChange">
             <el-button size="mini" icon="el-icon-arrow-left" @click="previous()" :disabled="$route.query.rowindex == 1"></el-button>
-            <el-button size="mini" @click="next()" :disabled="$route.query.rowindex  == turnTotal"><i class="el-icon-arrow-right" ></i></el-button>
+            <el-button size="mini" @click="next()" :disabled="turnTotal?$route.query.rowindex  == turnTotal:false"><i class="el-icon-arrow-right" ></i></el-button>
           </div>
         </div>
       </div>
@@ -327,6 +327,7 @@ export default {
         }
       })
       if (res.data.data) {
+        sessionStorage.setItem('total',res.data.total)
         this.$router.replace({path:this.$route.path,query:{id:res.data.data,rowindex:res.data.rowindex,listqueryid:listqueryid,fieldname:this.$route.query.fieldname}})
         this.$emit('pageChange',res.data.data,this.$route.query.rowindex)
       } else {

+ 28 - 3
src/components/normal-basic-layout/drawerDetail/drawer.vue

@@ -37,6 +37,7 @@ export default {
   },
   methods:{
     closeDrawer (done) {
+      let contractId = sessionStorage.getItem('contractId')
       console.log(this.historyRouter,'historyRouter')
       if (this.historyRouter) {
         if (this.$route.query.isPredicion){
@@ -71,9 +72,33 @@ export default {
         }
 
       } else {
-
-        this.$store.dispatch('changeDetailDrawer',false)
-        this.$router.go(-1)
+        let contractId = sessionStorage.getItem('contractId')
+        console.log(contractId,'contractId')
+        if (contractId && contractId != 'null'){
+          console.log('执行了111')
+          let rowindexOld = sessionStorage.getItem('rowindexOld')
+          let listqueryidOld = sessionStorage.getItem('listqueryidOld')
+          let typeOld = sessionStorage.getItem('typeOld')
+          let totalOld = sessionStorage.getItem('totalOld')
+          this.$store.dispatch('changeDetailDrawer',false)
+          setTimeout(()=>{
+            this.$router.push({path:'/contractDetail',
+              query:{
+                id:contractId,
+                rowindex:rowindexOld,
+                listqueryid:listqueryidOld,
+                type:typeOld,
+                fieldname:'sa_contract'
+              }})
+            /*this.$store.dispatch('saveListData',{listData:this.list,param:this.param,pageTotal:this.pageTotal})*/
+            sessionStorage.setItem('contractId',null)
+            sessionStorage.setItem('total',totalOld)
+            this.$store.dispatch('changeDetailDrawer',true)
+          },500)
+        }else {
+          this.$store.dispatch('changeDetailDrawer', false)
+          this.$router.go(-1)
+        }
       }
     }
   },