浏览代码

查重功能修改

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

+ 8 - 1
src/Form/projectChange/add.vue

@@ -165,7 +165,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button  size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
-        <duplicateCheck ref="check" :data="form"  @onSuccess="onClose"></duplicateCheck>
+        <duplicateCheck ref="check" :data="form"  @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
         <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -301,6 +301,13 @@ export default {
       this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
 
 
+    },
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
     },
     /*自动查重判断*/
     duplicateCheck(){

+ 8 - 1
src/Form/projectChange/edit.vue

@@ -170,7 +170,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width inline-16">取 消</el-button>
-        <duplicateCheck ref="check" :data="form"  @onSuccess="onClose"></duplicateCheck>
+        <duplicateCheck ref="check" :data="form"  @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
         <el-button size="small" type="warning" @click="onSave" class="normal-btn-width">保 存</el-button>
       </div>
     </el-drawer>
@@ -333,6 +333,13 @@ export default {
       this.form.signamount_due  ? this.form.signamount_due = this.tool.formatAmount(this.form.signamount_due,2):this.form.signamount_due = ''*/
 
     },
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
+    },
     /*自动查重判断*/
     duplicateCheck(){
       this.$refs.form.validate(async (valid) => {

+ 12 - 4
src/Form/publicCustomer/add.vue

@@ -251,7 +251,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
-        <duplicateCheck ref="check" :data="form" @onSuccess="onClose"></duplicateCheck>
+        <duplicateCheck ref="check" :data="form" @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
         <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -315,7 +315,7 @@ export default {
       value:'',
       rules:{
         enterprisename:[
-          { required: true, message: '输入客户名称', trigger: 'change,blur'},
+          { required: true, message: '输入客户名称', trigger: 'blur'},
         ],
         type: [
           { required: true, message: '还未选择客户类型', trigger: 'change' },
@@ -376,7 +376,7 @@ export default {
       }).then(() => {
         this.businessShow = false
         this.form.enterprisename = val.companyName
-        this.form.address = val.address
+        this.form.address = val.address === "-" ? '' : val.address
         this.form.taxno = val.taxNum
         this.value = [val.regProvince,val.regCity,val.regArea]
         this.form.province = val.regProvince
@@ -384,6 +384,7 @@ export default {
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
       }).catch(() => {
+        this.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'
@@ -400,6 +401,13 @@ export default {
       this.param.content.pageNumber = val
       this.businessSearch()
     },*/
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
+    },
     /*自动查重判断*/
     duplicateCheck(){
       this.$refs.form.validate(async (valid) => {
@@ -644,4 +652,4 @@ export default {
     display: flex;
     align-items: center;
   }
-</style>
+</style>

+ 10 - 2
src/Form/publicCustomer/edit.vue

@@ -249,7 +249,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
-        <duplicateCheck :data="form" ref="check" @onSuccess="onClose"></duplicateCheck>
+        <duplicateCheck :data="form" ref="check" @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
         <el-button size="small" type="warning" @click="onSave" class="normal-btn-width">保 存</el-button>
       </div>
     </el-drawer>
@@ -393,7 +393,7 @@ export default {
       }).then(() => {
         this.businessShow = false
         this.form.enterprisename = val.companyName
-        this.form.address = val.address
+        this.form.address = val.address === "-" ? '' : val.address
         this.form.taxno = val.taxNum
         this.form.value = [val.regProvince,val.regCity,val.regArea]
         this.form.province = val.regProvince
@@ -402,6 +402,7 @@ export default {
         this.form.contact = val.legalPerson
         console.log(this.form)
       }).catch(() => {
+        this.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'
@@ -418,6 +419,13 @@ export default {
       this.param.content.pageNumber = val
       this.businessSearch()
     },*/
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
+    },
     /*自动查重判断*/
     duplicateCheck(){
       this.$refs.form.validate(async (valid) => {

+ 11 - 3
src/Form/salerPrivatecustomer/add.vue

@@ -254,7 +254,7 @@
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
 <!--        <el-button size="small" type="primary" @click="duplicateChecking" class="normal-btn-width">查 重</el-button>-->
-        <duplicateCheck ref="check" :data="form" @onSuccess="onClose"></duplicateCheck>
+        <duplicateCheck ref="check" :data="form" @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
         <el-button size="small" type="primary" :loading="loading" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -401,7 +401,7 @@ export default {
       }).then(() => {
         this.businessShow = false
         this.form.enterprisename = val.companyName
-        this.form.address = val.address
+        this.form.address = val.address === "-" ? '' : val.address
         this.form.taxno = val.taxNum
         this.value = [val.regProvince,val.regCity,val.regArea]
         this.form.province = val.regProvince
@@ -409,6 +409,7 @@ export default {
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
       }).catch(() => {
+        this.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'
@@ -425,6 +426,13 @@ export default {
       this.param.content.pageNumber = val
       this.businessSearch()
     },*/
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
+    },
     /*自动查重判断*/
     duplicateCheck(){
       this.$refs.form.validate(async (valid) => {
@@ -641,4 +649,4 @@ export default {
   display: flex;
   align-items: center;
 }
-</style>
+</style>

+ 10 - 2
src/Form/salerPrivatecustomer/edit.vue

@@ -195,7 +195,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button  size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
-        <duplicateCheck :data="form" ref="check" @onSuccess="onClose"></duplicateCheck>
+        <duplicateCheck :data="form" ref="check" @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
         <el-button size="small" type="warning" @click="onSave" class="normal-btn-width">保 存</el-button>
       </div>
     </el-drawer>
@@ -348,7 +348,7 @@ export default {
       }).then(() => {
         this.businessShow = false
         this.form.enterprisename = val.companyName
-        this.form.address = val.address
+        this.form.address = val.address === "-" ? '' : val.address
         this.form.taxno = val.taxNum
         this.value = [val.regProvince,val.regCity,val.regArea]
         this.form.province = val.regProvince
@@ -356,6 +356,7 @@ export default {
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
       }).catch(() => {
+        this.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'
@@ -372,6 +373,13 @@ export default {
       this.param.content.pageNumber = val
       this.businessSearch()
     },*/
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
+    },
     /*自动查重判断*/
     duplicateCheck(){
       this.$refs.form.validate(async (valid) => {

+ 10 - 3
src/SManagement/orderclue_detail/components/changeCustomer.vue

@@ -188,7 +188,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
-        <duplicateCheck :data="form" ref="check" @checkSuccess="checkSuccess" @onSuccess="onClose"></duplicateCheck>
+        <duplicateCheck :data="form" ref="check" @checkSuccess="checkSuccess" @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
         <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -294,6 +294,13 @@ export default {
       this.typeList()
       this.queryCustomerGrade()
     },
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
+    },
     /*自动查重判断*/
     duplicateCheck(){
       this.$refs.form.validate(async (valid) => {
@@ -419,7 +426,7 @@ export default {
     onBusinessData(val){
       this.form.enterprisename_customer = val.companyName
       this.form.enterprisename = val.companyName
-      this.form.address = val.address
+      this.form.address = val.address === "-" ? '' : val.address
       this.form.taxno = val.taxNum
       this.value = [val.regProvince,val.regCity,val.regArea]
       this.form.province = val.regProvince
@@ -547,4 +554,4 @@ export default {
   display: flex;
   align-items: center;
 }
-</style>
+</style>

+ 8 - 1
src/SManagement/orderclue_detail/components/changeProject.vue

@@ -165,7 +165,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button  size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
-        <duplicateCheck :data="form" @checkSuccess="checkSuccess" ref="check" @onSuccess="onClose"></duplicateCheck>
+        <duplicateCheck :data="form" @checkSuccess="checkSuccess" ref="check" @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
         <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -308,6 +308,13 @@ export default {
       this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
 
     },
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
+    },
     /*自动查重判断*/
     duplicateCheck(){
       this.$refs.form.validate(async (valid) => {

+ 5 - 2
src/components/duplicatesCheck/customerChangeCheck.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="queryRule" class="inline-16 normal-btn-width">查 重</el-button>
+    <el-button size="small" type="primary" @click="isCheck" class="inline-16 normal-btn-width">查 重</el-button>
     <el-dialog title="重复客户" :visible.sync="dialogTableVisible" append-to-body width="1000px">
       <div slot="title" class="dialog-title">
         <span class="title-text">重复客户</span>
@@ -161,6 +161,9 @@ export default {
       this.listData()
     },
     /*查询规则*/
+    isCheck(){
+      this.$emit('onCheck')
+    },
     async queryRule(){
       const res = await this.$api.requested({
         "id": "20230410090502",
@@ -180,4 +183,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 5 - 2
src/components/duplicatesCheck/customerCheck.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="queryRule" class="inline-16 normal-btn-width">查 重</el-button>
+    <el-button size="small" type="primary" @click="isCheck" class="inline-16 normal-btn-width">查 重</el-button>
     <el-dialog title="重复客户" :visible.sync="dialogTableVisible" append-to-body width="1000px" @close="dialogTableVisible = false">
       <div slot="title" class="dialog-title">
         <span class="title-text">重复客户</span>
@@ -203,6 +203,9 @@ export default {
       this.listData()
     },
     /*查询规则*/
+    isCheck(){
+      this.$emit('onCheck')
+    },
     async queryRule(callback){
       const res = await this.$api.requested({
         "id": "20230410090502",
@@ -223,4 +226,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 5 - 2
src/components/duplicatesCheck/projectChangeCheck.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="queryRule" class="inline-16 normal-btn-width">查 重</el-button>
+    <el-button size="small" type="primary" @click="isCheck" class="inline-16 normal-btn-width">查 重</el-button>
     <el-dialog title="重复项目" :visible.sync="dialogTableVisible" append-to-body width="1000px">
       <div slot="title" class="dialog-title">
         <span class="title-text">重复项目</span>
@@ -191,6 +191,9 @@ export default {
       this.listData()
     },
     /*查询规则*/
+    isCheck(){
+      this.$emit('onCheck')
+    },
     async queryRule(){
       const res = await this.$api.requested({
         "id": "20230410090502",
@@ -210,4 +213,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 5 - 2
src/components/duplicatesCheck/projectCheck.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="queryRule" class="inline-16 normal-btn-width">查 重</el-button>
+    <el-button size="small" type="primary" @click="isCheck" class="inline-16 normal-btn-width">查 重</el-button>
     <el-dialog title="重复项目" :visible.sync="dialogTableVisible" append-to-body width="1000px">
       <div slot="title" class="dialog-title">
         <span class="title-text">重复项目</span>
@@ -239,6 +239,9 @@ export default {
      }
     },
     /*查询规则*/
+    isCheck(){
+      this.$emit('onCheck')
+    },
     async queryRule(){
       const res = await this.$api.requested({
         "id": "20230410090502",
@@ -258,4 +261,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 5 - 2
src/components/duplicatesCheck/publicCustomerCheck.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="queryRule" class="inline-16 normal-btn-width">查 重</el-button>
+    <el-button size="small" type="primary" @click="isCheck" class="inline-16 normal-btn-width">查 重</el-button>
     <el-dialog title="重复客户" :visible.sync="dialogTableVisible" append-to-body width="1000px">
       <div slot="title" class="dialog-title">
         <span class="title-text">重复客户</span>
@@ -205,6 +205,9 @@ export default {
       }
     },
     /*查询规则*/
+    isCheck(){
+      this.$emit('onCheck')
+    },
     async queryRule(){
       const res = await this.$api.requested({
         "id": "20230410090502",
@@ -224,4 +227,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>