qymljy 2 年之前
父节点
当前提交
c9ba31df98

+ 18 - 1
src/HManagement/ecycle/contract/index.vue

@@ -6,7 +6,12 @@
         idName="sa_contractid"
         :apiId="{query:20221121201502,del:''}"
         :autoQuery="false"
+        @checkboxCallBack="checkboxCallBack"
     >
+      <template #titleLight>
+        <batchDeletion v-if="tool.checkAuth($route.name,'batchDeletion')" ref="batchDeletion" :ownerids="selectData" :sys_object="application" @delSuccess="queryData"></batchDeletion>
+        <batchRecovery v-if="tool.checkAuth($route.name,'batchRecovery')" ref="batchRecovery" :ownerids="selectData" :sys_object="application" @recoverySuccess="queryData"></batchRecovery>
+      </template>
       <template #custom>
         <div class="mt-10">
           <p class="search__label">应用:</p>
@@ -121,6 +126,8 @@
 <script>
 import recovery from "@/HManagement/ecycle/modules/recovery";
 import delData from "@/HManagement/ecycle/modules/delData";
+import batchDeletion from "@/HManagement/ecycle/modules/batchDeletion";
+import batchRecovery from "@/HManagement/ecycle/modules/batchRecovery";
 
 export default {
   name: "index",
@@ -162,9 +169,10 @@ export default {
         begindate:"",
         enddate:""
       },
+      selectData:[]
     }
   },
-  components:{recovery,delData},
+  components:{recovery,delData,batchDeletion,batchRecovery},
   methods:{
     queryData(){
       this.$refs.basicLayout.param.content.isAll = 0
@@ -211,6 +219,15 @@ export default {
       this.$refs.basicLayout.param.content.where = this.selectParam
       this.$refs.basicLayout.listData()
     },
+    checkboxCallBack(val){
+      this.selectData = []
+      val.forEach((item,index) => {
+        this.selectData[index] = item.sa_contractid
+      })
+      this.$refs.batchDeletion.length = this.selectData.length
+      this.$refs.batchRecovery.length = this.selectData.length
+      console.log(this.selectData)
+    }
   },
   mounted() {
     this.queryData()

+ 20 - 2
src/HManagement/ecycle/customer/index.vue

@@ -6,7 +6,12 @@
         idName="sa_customersid"
         :apiId="{query:20221012164402,del:''}"
         :autoQuery="false"
+        @checkboxCallBack="checkboxCallBack"
     >
+      <template #titleLight>
+        <batchDeletion v-if="tool.checkAuth($route.name,'batchDeletion')" ref="batchDeletion" :ownerids="selectData" :sys_object="application" @delSuccess="queryData"></batchDeletion>
+        <batchRecovery v-if="tool.checkAuth($route.name,'batchRecovery')" ref="batchRecovery" :ownerids="selectData" :sys_object="application" @recoverySuccess="queryData"></batchRecovery>
+      </template>
       <template #custom>
         <div class="mt-10">
           <p class="search__label">应用:</p>
@@ -130,6 +135,8 @@
 <script>
 import recovery from "@/HManagement/ecycle/modules/recovery";
 import delData from "@/HManagement/ecycle/modules/delData";
+import batchDeletion from "@/HManagement/ecycle/modules/batchDeletion";
+import batchRecovery from "@/HManagement/ecycle/modules/batchRecovery";
 
 export default {
   name: "index",
@@ -183,10 +190,11 @@ export default {
         enddate:'',
 
       },
-      dateSelect:''
+      dateSelect:'',
+      selectData:[]
     }
   },
-  components:{recovery,delData},
+  components:{recovery,delData,batchDeletion,batchRecovery},
   methods:{
     queryData(){
       this.$refs.basicLayout.param.content.isAll = 0
@@ -272,6 +280,16 @@ export default {
       this.$refs.basicLayout.param.content.phonenumber = 1
       this.$refs['basicLayout'].listData()
     },
+    checkboxCallBack(val){
+      console.log(val,"客户")
+      this.selectData = []
+      val.forEach((item,index) => {
+        this.selectData[index] = item.sa_customersid
+      })
+      this.$refs.batchDeletion.length = this.selectData.length
+      this.$refs.batchRecovery.length = this.selectData.length
+      console.log(this.selectData)
+    }
   },
   mounted() {
     this.queryData()

+ 50 - 0
src/HManagement/ecycle/modules/batchDeletion.vue

@@ -0,0 +1,50 @@
+<template>
+  <div>
+    <el-button size="small" class="inline-16" :type="length === 0?'':'primary'" @click="onshow" :disabled="length === 0">批量删除</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "batchDeletion",
+  props:["sys_object","ownerids"],
+  data(){
+    return {
+      length:0
+    }
+  },
+  methods:{
+    onshow() {
+      this.$confirm('是否确认彻底删除数据,一旦删除,无法恢复?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        closeOnClickModal:false,
+        type: 'warning'
+      }).then(() => {
+        this.onDel()
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    async onDel(){
+      const res = await this.$api.requested({
+        "id": 20230103131204,
+        "content": {
+          "sys_object": this.sys_object,//1-线索,2-客户,3-合同,4-项目商机,5-报价单
+          "ownerids": this.ownerids
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.$emit("delSuccess")
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 50 - 0
src/HManagement/ecycle/modules/batchRecovery.vue

@@ -0,0 +1,50 @@
+<template>
+  <div>
+    <el-button size="small" class="inline-16" :type="length === 0?'':'primary'" @click="onshow" :disabled="length === 0" >批量恢复</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "batchRecovery",
+  props:["sys_object","ownerids"],
+  data(){
+    return {
+      length:0
+    }
+  },
+  methods:{
+    onshow() {
+      this.$confirm('数据恢复至原账号原位置,是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        closeOnClickModal:false,
+        type: 'warning'
+      }).then(() => {
+        this.onRecovery()
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    async onRecovery(){
+      const res = await this.$api.requested({
+        "id": 20230103131104,
+        "content": {
+          "sys_object": this.sys_object,//1-线索,2-客户,3-合同,4-项目商机,5-报价单
+          "ownerids": this.ownerids
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.$emit("recoverySuccess")
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 1
src/HManagement/ecycle/modules/delData.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button type="text" size="mini" @click="onshow" >删 除</el-button>
+    <el-button type="text" size="mini" @click="onshow" :disabled="!tool.checkAuth($route.name,'delData')">删 除</el-button>
   </div>
 </template>
 

+ 1 - 1
src/HManagement/ecycle/modules/recovery.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button type="text" size="mini" @click="onshow">恢 复</el-button>
+    <el-button type="text" size="mini" @click="onshow" :disabled="!tool.checkAuth($route.name,'recovery')">恢 复</el-button>
   </div>
 </template>
 

+ 18 - 1
src/HManagement/ecycle/projectChange/index.vue

@@ -7,7 +7,12 @@
         idName="sa_projectid"
         :apiId="{query:20221020143502,del:''}"
         :autoQuery="false"
+        @checkboxCallBack="checkboxCallBack"
     >
+      <template #titleLight>
+        <batchDeletion v-if="tool.checkAuth($route.name,'batchDeletion')" ref="batchDeletion" :ownerids="selectData" :sys_object="application" @delSuccess="queryData"></batchDeletion>
+        <batchRecovery v-if="tool.checkAuth($route.name,'batchRecovery')" ref="batchRecovery" :ownerids="selectData" :sys_object="application" @recoverySuccess="queryData"></batchRecovery>
+      </template>
       <template #custom>
         <div class="mt-10">
           <p class="search__label">应用:</p>
@@ -130,6 +135,8 @@
  */
 import recovery from "@/HManagement/ecycle/modules/recovery"
 import delData from "@/HManagement/ecycle/modules/delData"
+import batchDeletion from "@/HManagement/ecycle/modules/batchDeletion";
+import batchRecovery from "@/HManagement/ecycle/modules/batchRecovery";
 export default {
   data () {
     return {
@@ -186,9 +193,10 @@ export default {
         enddate:'',
         stagename:''
       },
+      selectData:''
     }
   },
-  components:{recovery,delData},
+  components:{recovery,delData,batchDeletion,batchRecovery},
   methods:{
     queryData(){
       this.$refs.basicLayout.param.content.isAll = 0
@@ -254,6 +262,15 @@ export default {
       this.$refs.basicLayout.param.content.where = this.selectParam
       this.$refs.basicLayout.listData()
     },
+    checkboxCallBack(val){
+      this.selectData = []
+      val.forEach((item,index) => {
+        this.selectData[index] = item.sa_projectid
+      })
+      this.$refs.batchDeletion.length = this.selectData.length
+      this.$refs.batchRecovery.length = this.selectData.length
+      console.log(this.selectData)
+    }
   },
   mounted() {
     this.queryData()

+ 18 - 1
src/HManagement/ecycle/quotedPrice/index.vue

@@ -6,7 +6,12 @@
         idName="sa_quotedpriceid"
         :apiId="{query:20221020165103,del:''}"
         :autoQuery="false"
+        @checkboxCallBack="checkboxCallBack"
     >
+      <template #titleLight>
+        <batchDeletion v-if="tool.checkAuth($route.name,'batchDeletion')" ref="batchDeletion" :ownerids="selectData" :sys_object="application" @delSuccess="queryData"></batchDeletion>
+        <batchRecovery v-if="tool.checkAuth($route.name,'batchRecovery')" ref="batchRecovery" :ownerids="selectData" :sys_object="application" @recoverySuccess="queryData"></batchRecovery>
+      </template>
       <template #custom>
         <div class="mt-10">
           <p class="search__label">应用:</p>
@@ -115,6 +120,8 @@
 <script>
 import recovery from "@/HManagement/ecycle/modules/recovery"
 import delData from "@/HManagement/ecycle/modules/delData"
+import batchDeletion from "@/HManagement/ecycle/modules/batchDeletion";
+import batchRecovery from "@/HManagement/ecycle/modules/batchRecovery";
 export default {
   name: "index",
   data () {
@@ -170,9 +177,10 @@ export default {
         startdate:'',
         enddate:'',
       },
+      selectData:[]
     }
   },
-  components:{recovery,delData},
+  components:{recovery,delData,batchDeletion,batchRecovery},
   methods:{
     queryData(){
       this.$refs.basicLayout.param.content.isAll = 0
@@ -206,6 +214,15 @@ export default {
       })
       this.issaler = res.data.hr.issaler
     },
+    checkboxCallBack(val){
+      this.selectData = []
+      val.forEach((item,index) => {
+        this.selectData[index] = item.sa_quotedpriceid
+      })
+      this.$refs.batchDeletion.length = this.selectData.length
+      this.$refs.batchRecovery.length = this.selectData.length
+      console.log(this.selectData)
+    }
   },
   mounted() {
     this.queryData()

+ 19 - 2
src/HManagement/ecycle/saleClue/index.vue

@@ -7,7 +7,12 @@
         idName="sat_orderclueid"
         :apiId="{query:20221101094502,del:''}"
         :autoQuery="false"
+        @checkboxCallBack="checkboxCallBack"
         >
+      <template #titleLight>
+        <batchDeletion v-if="tool.checkAuth($route.name,'batchDeletion')"  ref="batchDeletion" :ownerids="selectData" :sys_object="application" @delSuccess="queryData"></batchDeletion>
+        <batchRecovery v-if="tool.checkAuth($route.name,'batchRecovery')" ref="batchRecovery" :ownerids="selectData" :sys_object="application" @recoverySuccess="queryData"></batchRecovery>
+      </template>
       <template #custom>
         <div class="mt-10">
           <p class="search__label">应用:</p>
@@ -74,6 +79,8 @@
  */
 import recovery from "@/HManagement/ecycle/modules/recovery"
 import delData from "@/HManagement/ecycle/modules/delData"
+import batchDeletion from "@/HManagement/ecycle/modules/batchDeletion";
+import batchRecovery from "@/HManagement/ecycle/modules/batchRecovery";
 export default {
   data () {
     return {
@@ -101,10 +108,11 @@ export default {
         }
       ],
       status:'',
-      statusList:[]
+      statusList:[],
+      selectData:[]
     }
   },
-  components:{recovery,delData},
+  components:{recovery,delData,batchDeletion,batchRecovery},
   methods:{
     queryData(){
       this.$refs.basicLayout.param.content.isAll = 0
@@ -118,6 +126,15 @@ export default {
     },
     delSuccess(){
       this.queryData()
+    },
+    checkboxCallBack(val){
+      this.selectData = []
+      val.forEach((item,index) => {
+        this.selectData[index] = item.sat_orderclueid
+      })
+      this.$refs.batchDeletion.length = this.selectData.length
+      this.$refs.batchRecovery.length = this.selectData.length
+      console.log(this.selectData)
     }
   },
   mounted() {

+ 2 - 2
src/SDrpManagement/salerPrivatecustomer/detail/modules/addressManage/list.vue

@@ -22,8 +22,8 @@
         <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
       </template>
       <template v-slot:opreation="scope">
-        <edit v-if="tool.checkAuth($route.name,'customerAddressManage')"  :data="scope.data" @updateSuccess="onSuccess" ></edit>
-        <toVoid v-if="tool.checkAuth($route.name,'customerAddressManage')" :data="scope.data" @toVoidSuccess="onSuccess"></toVoid>
+        <edit  :data="scope.data" @updateSuccess="onSuccess" ></edit>
+        <toVoid  :data="scope.data" @toVoidSuccess="onSuccess"></toVoid>
       </template>
     </tableLayout>
     <div style="margin-top:16px;text-align:right">

+ 1 - 1
src/SDrpManagement/salerPrivatecustomer/detail/modules/addressManage/modules/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="inline-16">
-    <el-button size="small" type="text" @click="onshow" :disabled="tool.checkAuth($route.name,'customerAddressManage')">编 辑</el-button>
+    <el-button size="small" type="text" @click="onshow" :disabled="!tool.checkAuth($route.name,'customerAddressManage')">编 辑</el-button>
     <el-drawer
         title="编辑客户地址"
         :visible.sync="dialogFormVisible"

+ 1 - 1
src/SDrpManagement/salerPrivatecustomer/detail/modules/addressManage/modules/toVoid.vue

@@ -3,7 +3,7 @@
     <el-popconfirm
         title="确定要作废该客户地址嘛?"
         @confirm="toVoidRow()">
-      <el-button slot="reference" size="small" type="text" :disabled="tool.checkAuth($route.name,'customerAddressManage')">作 废</el-button>
+      <el-button slot="reference" size="small" type="text" :disabled="!tool.checkAuth($route.name,'customerAddressManage')">作 废</el-button>
     </el-popconfirm>
     <el-dialog
         :visible.sync="dialogToVoidVisible"

+ 1 - 1
src/SDrpManagement/salerPrivatecustomer/detail/modules/contacts/modules/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="inline-16">
-    <el-button size="small" type="text" @click="onshow" :disabled="tool.checkAuth($route.name,'contactManage')">编 辑</el-button>
+    <el-button size="small" type="text" @click="onshow" :disabled="!tool.checkAuth($route.name,'contactManage')">编 辑</el-button>
     <el-drawer
         title="编辑联系人"
         :visible.sync="dialogFormVisible"

+ 1 - 1
src/SDrpManagement/salerPrivatecustomer/detail/modules/contacts/modules/toVoid.vue

@@ -3,7 +3,7 @@
     <el-popconfirm
         title="确定要删除该联系人嘛?"
         @confirm="toVoidRow()">
-      <el-button slot="reference" size="small" type="text" :disabled="tool.checkAuth($route.name,'contactManage')">删 除</el-button>
+      <el-button slot="reference" size="small" type="text" :disabled="!tool.checkAuth($route.name,'contactManage')">删 除</el-button>
     </el-popconfirm>
   </div>
 </template>

+ 3 - 3
src/SManagement/sales_forecast/index.vue

@@ -48,7 +48,7 @@
         </div>
       </template>
       <template v-slot:tbOpreation="scope">
-<!--        <el-button type="text" size="mini" @click="detailGo(scope.data)">提 报</el-button>-->
+        <el-button type="text" size="mini" @click="detailGo(scope.data)">提 报</el-button>
       </template>
     </basicLayout>
   </div>
@@ -121,8 +121,8 @@ export default {
       this.$router.push({
         path:'/product_detail',
         query:{
-          id:row.sa_salesforecastbillid,
-          rowindex:row.rowindex
+          id:row.data.sa_salesforecastbillid,
+          rowindex:row.data.rowindex
         }
       })
 

+ 2 - 1
src/SManagement/sales_forecast/modules/modelDetail.vue

@@ -7,7 +7,7 @@
         :editData="mainData"
         :mainAreaData="mainAreaData"
         turnPageId="20220906154403"
-        idname="sa_salesforecastmodelid"
+        idname="sa_salesforecastbillid"
         :tabs="['项目产品清单']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
@@ -107,6 +107,7 @@ export default {
     // 监听切换数据,上一页,下一页
     pageChange (id,rowindex,tabIndex) {
       this.flag = false
+      console.log(id,"翻页获取的id")
       this.$router.replace({path:'/product_detail',query:{id:id,rowindex:rowindex}})
       this.queryMainData(id)
     },

+ 2 - 1
src/SManagement/sales_forecast/modules/project.vue

@@ -63,7 +63,6 @@ export default {
     return {
       param:{
         "id": 20220916115203,
-        "version":1,
         "content": {
           "pageNumber":1,
           "pageSize":20,
@@ -82,10 +81,12 @@ export default {
   },
   methods:{
     async listData () {
+      console.log(this.$route.query.id)
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      console.log(res,"项目")
       this.$emit('queryProduct',res.data[0].sa_projectid)
     },
     async deleteProject (row) {

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

@@ -12,6 +12,7 @@
               </div>
             </div>
             <div style="margin:0 8px"></div>
+            <slot name="titleLight"></slot>
             <div class="flex-align-center">
               <div v-if="oldFormPath || formPath">
                 <cpAdd v-if="tool.checkAuth($route.name,'insert')" :formPath="formPath" :oldFormPath="oldFormPath" @onAddSuccess="listData(param.content.pageNumber = 1)"></cpAdd>