Explorar o código

回收站,项目客户恢复新增查重判断

qymljy %!s(int64=2) %!d(string=hai) anos
pai
achega
1f979f71fe

+ 2 - 2
src/HManagement/ecycle/contract/index.vue

@@ -117,7 +117,7 @@
       </template>
       </template>
       <template v-slot:tbOpreation="scope">
       <template v-slot:tbOpreation="scope">
         <delData class="inline-16" :ownerid="scope.data.data.sa_contractid" :sys_object="application" @delSuccess="queryData"></delData>
         <delData class="inline-16" :ownerid="scope.data.data.sa_contractid" :sys_object="application" @delSuccess="queryData"></delData>
-        <recovery class="inline-16" :ownerid="scope.data.data.sa_contractid" :sys_object="application" @recoverySuccess="queryData"></recovery>
+        <recovery type="合同" class="inline-16" :ownerid="scope.data.data.sa_contractid" :sys_object="application" @recoverySuccess="queryData"></recovery>
       </template>
       </template>
     </basicLayout>
     </basicLayout>
   </div>
   </div>
@@ -241,4 +241,4 @@ export default {
 
 
 <style scoped>
 <style scoped>
 
 
-</style>
+</style>

+ 1 - 1
src/HManagement/ecycle/customer/index.vue

@@ -126,7 +126,7 @@
       </template>
       </template>
       <template v-slot:tbOpreation="scope">
       <template v-slot:tbOpreation="scope">
         <delData class="inline-16" :ownerid="scope.data.data.sa_customersid" :sys_object="application" @delSuccess="queryData"></delData>
         <delData class="inline-16" :ownerid="scope.data.data.sa_customersid" :sys_object="application" @delSuccess="queryData"></delData>
-        <recovery class="inline-16" :ownerid="scope.data.data.sa_customersid" :sys_object="application" :data="scope.data.data" @recoverySuccess="queryData"></recovery>
+        <recovery type="客户" class="inline-16" :ownerid="scope.data.data.sa_customersid" :sys_object="application" :data="scope.data.data" @recoverySuccess="queryData"></recovery>
       </template>
       </template>
     </basicLayout>
     </basicLayout>
   </div>
   </div>

+ 87 - 11
src/HManagement/ecycle/modules/recovery.vue

@@ -1,13 +1,56 @@
 <template>
 <template>
   <div>
   <div>
     <el-button type="text" size="mini" @click="queryRule" :disabled="!tool.checkAuth($route.name,'recovery')">恢 复</el-button>
     <el-button type="text" size="mini" @click="queryRule" :disabled="!tool.checkAuth($route.name,'recovery')">恢 复</el-button>
+    <el-dialog title="重复客户" :visible.sync="dialogTableVisible" append-to-body width="1000px" @close="onClose">
+      <div slot="title" class="dialog-title">
+        <span class="title-text">{{type === '客户'?'重复客户':'重复项目'}}</span>
+        <p style="font-size: 14px;color: red">{{type === '客户'?'已存在重复客户不可恢复':'当前项目重复是否恢复至原位置'}}</p>
+      </div>
+      <tableLayout :layout="tablecols" :data="list" :opwidth="200" height="calc(100vh - 550px)" :width="true" :custom="true" >
+        <template v-slot:customcol="scope">
+          <div v-if="scope.column.columnname === 'tag'">
+            <div v-for="item in scope.column.data.tag_sys" :key="item.index"  style="float: left;margin-left: 5px;margin-bottom: 5px">
+              <el-tag  color="#3874F6" size="mini" type="primary" effect="dark">
+                <span>{{item}}</span>
+              </el-tag>
+            </div>
+            <div v-for="item in scope.column.data.tag" :key="item.index"  style="float: left;margin-left: 5px;margin-bottom: 5px">
+              <el-tag color="#FA8C16" size="mini" type="warning" effect="dark">
+                <span>{{item}}</span>
+              </el-tag>
+            </div>
+          </div>
+          <div v-else-if="scope.column.columnname === 'leader'">
+            <span>{{scope.column.data.leader?scope.column.data.leader.length !== 0 ? scope.column.data.leader[0].name:'--':'--'}}</span>
+          </div>
+          <p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
+        </template>
+      </tableLayout>
+      <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="20"
+            :total="total">
+        </el-pagination>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button v-if="type === '客户'" @click="dialogTableVisible = false" size="small" type="primary" class="normal-btn-width">确 定</el-button>
+         <el-button v-if="type === '项目'" @click="dialogTableVisible = false;onRecovery()" size="small" type="primary" class="normal-btn-width">确定恢复</el-button>
+         <el-button v-if="type === '项目'" @click="dialogTableVisible = false" size="small"  class="normal-btn-width">取 消</el-button>
+        <!--        <el-button :type="buttonTitle === '确定保存'?'warning':'primary'" @click="onCheck" size="small" class="normal-btn-width">{{buttonTitle}}</el-button>-->
+      </span>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 export default {
 export default {
   name: "recovery",
   name: "recovery",
-  props:["sys_object","ownerid","data"],
+  props:["sys_object","ownerid","data","type"],
   data(){
   data(){
     return {
     return {
       dialogTableVisible:false,
       dialogTableVisible:false,
@@ -34,14 +77,25 @@ export default {
   methods:{
   methods:{
     /*查询规则*/
     /*查询规则*/
     async queryRule(){
     async queryRule(){
-      const res = await this.$api.requested({
-        "id": "20230410090502",
-        "content": {},
-      })
-      this.fields1 = res.data.custcheckrule.fields1
-      this.fields2 = res.data.custcheckrule.fields2
-      this.fields3 = res.data.custcheckrule.fields3
-      this.queryData()
+      if (this.type === '项目' || this.type === '客户'){
+        const res = await this.$api.requested({
+          "id": "20230410090502",
+          "content": {},
+        })
+        if (this.type === '客户'){
+          this.fields1 = res.data.custcheckrule.fields1
+          this.fields2 = res.data.custcheckrule.fields2
+          this.fields3 = res.data.custcheckrule.fields3
+        }else {
+          this.fields1 = res.data.projectcheckrule.fields1
+          this.fields2 = res.data.projectcheckrule.fields2
+          this.fields3 = res.data.projectcheckrule.fields3
+        }
+        this.queryData()
+      }else {
+        this.onshow()
+      }
+
     },
     },
     async queryData(){
     async queryData(){
       console.log(this.fields1,'fields1')
       console.log(this.fields1,'fields1')
@@ -57,7 +111,13 @@ export default {
       this.fields3.forEach(item=>{
       this.fields3.forEach(item=>{
         this.param.content[item] = this.data[item] || ""
         this.param.content[item] = this.data[item] || ""
       })
       })
-      this.param.content.sa_customersid = this.data.sa_customersid
+      if (this.type === '客户'){
+        this.param.id = 20221208172002
+        this.param.content.sa_customersid = this.data.sa_customersid
+      }else {
+        this.param.id = 20221208184202
+        this.param.content.sa_projectid = this.data.sa_projectid
+      }
       const res = await this.$api.requested(this.param)
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.list = res.data
       this.total = res.total
       this.total = res.total
@@ -68,7 +128,6 @@ export default {
       }else {
       }else {
         this.onshow()
         this.onshow()
       }
       }
-
     },
     },
     onshow() {
     onshow() {
       this.$confirm('数据恢复至原账号原位置,是否继续?', '提示', {
       this.$confirm('数据恢复至原账号原位置,是否继续?', '提示', {
@@ -96,7 +155,24 @@ export default {
       this.tool.showMessage(res,()=>{
       this.tool.showMessage(res,()=>{
         this.$emit("recoverySuccess")
         this.$emit("recoverySuccess")
       })
       })
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.queryData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.queryData()
+    },
+    onClose(){
+      this.dialogTableVisible = false
     }
     }
+  },
+  created() {
+    this.tablecols = this.type === '客户'?this.tool.tabelCol(this.$route.name).duplicatesCustomerTable.tablecols:this.type === '项目'?this.tool.tabelCol(this.$route.name).duplicatesProjectTable.tablecols:[]
+
   }
   }
 }
 }
 </script>
 </script>

+ 2 - 2
src/HManagement/ecycle/projectChange/index.vue

@@ -118,7 +118,7 @@
       </template>
       </template>
       <template v-slot:tbOpreation="scope">
       <template v-slot:tbOpreation="scope">
         <delData class="inline-16" :ownerid="scope.data.data.sa_projectid" :sys_object="application" @delSuccess="queryData"></delData>
         <delData class="inline-16" :ownerid="scope.data.data.sa_projectid" :sys_object="application" @delSuccess="queryData"></delData>
-        <recovery class="inline-16" :ownerid="scope.data.data.sa_projectid" :sys_object="application" @recoverySuccess="queryData"></recovery>
+        <recovery type="项目" class="inline-16" :ownerid="scope.data.data.sa_projectid" :sys_object="application" :data="scope.data.data" @recoverySuccess="queryData"></recovery>
       </template>
       </template>
     </basicLayout>
     </basicLayout>
   </div>
   </div>
@@ -284,4 +284,4 @@ export default {
 
 
 </script>
 </script>
 <style>
 <style>
-</style>
+</style>

+ 2 - 2
src/HManagement/ecycle/quotedPrice/index.vue

@@ -111,7 +111,7 @@
       </template>
       </template>
       <template v-slot:tbOpreation="scope">
       <template v-slot:tbOpreation="scope">
         <delData class="inline-16" :ownerid="scope.data.data.sa_quotedpriceid" :sys_object="application" @delSuccess="queryData"></delData>
         <delData class="inline-16" :ownerid="scope.data.data.sa_quotedpriceid" :sys_object="application" @delSuccess="queryData"></delData>
-        <recovery class="inline-16" :ownerid="scope.data.data.sa_quotedpriceid" :sys_object="application" @recoverySuccess="queryData"></recovery>
+        <recovery type="报价" class="inline-16" :ownerid="scope.data.data.sa_quotedpriceid" :sys_object="application" @recoverySuccess="queryData"></recovery>
       </template>
       </template>
     </basicLayout>
     </basicLayout>
   </div>
   </div>
@@ -233,4 +233,4 @@ export default {
 
 
 <style scoped>
 <style scoped>
 
 
-</style>
+</style>

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

@@ -62,7 +62,7 @@
       </template>
       </template>
       <template v-slot:tbOpreation="scope">
       <template v-slot:tbOpreation="scope">
         <delData class="inline-16" :ownerid="scope.data.data.sat_orderclueid" :sys_object="application" @delSuccess="delSuccess"></delData>
         <delData class="inline-16" :ownerid="scope.data.data.sat_orderclueid" :sys_object="application" @delSuccess="delSuccess"></delData>
-        <recovery class="inline-16" :ownerid="scope.data.data.sat_orderclueid" :sys_object="application" @recoverySuccess="queryData"></recovery>
+        <recovery type="线索" class="inline-16" :ownerid="scope.data.data.sat_orderclueid" :sys_object="application" @recoverySuccess="queryData"></recovery>
       </template>
       </template>
     </basicLayout>
     </basicLayout>
   </div>
   </div>
@@ -149,4 +149,4 @@ export default {
 
 
 </script>
 </script>
 <style>
 <style>
-</style>
+</style>