Browse Source

竞争对手查重

qymljy 2 years ago
parent
commit
7bc8a2e2bd

+ 91 - 40
src/Form/competitor/add.vue

@@ -17,24 +17,47 @@
                 <el-input v-model="form.brandname" placeholder="请输入品牌名称"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
+            <el-col :span="20">
               <el-form-item label="企业名称:" prop="enterprisename">
-                <el-popover
-                    placement="bottom"
-                    width="100%"
-                    v-model="visible">
-                  <div>
-                    <ul class="enterprisePanel">
-                      <li v-for="item in ENlist" :key="item.sys_enterpriseid" @click="chooseEnterprise(item)">
-                        <p>{{item.enterprisename}}</p>
-                        <small>{{item.province}}-{{item.city}}-{{item.county}}</small>
-                      </li>
-                    </ul>
-                  </div>
-                  <el-input slot="reference" v-model="form.enterprisename" @focus="queryEnterpriseArchives" @input.native="onChange"  placeholder="输入企业名称" clearable></el-input>
-                </el-popover>
+                  <el-input  v-model="form.enterprisename"  placeholder="输入企业名称" clearable></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="4">
+              <el-popover
+                  placement="right"
+                  width="900"
+                  v-model="businessShow"
+                  trigger="manual">
+                <el-input
+                    style="width:300px;margin-bottom: 10px"
+                    placeholder="请输入内容"
+                    v-model="form.enterprisename"
+                    clearable
+                    @clear="businessSearch"
+                    size="mini"
+                    @keyup.enter.native="businessSearch">
+                  <i slot="prefix" class="el-icon-search" @click="businessSearch"></i>
+                </el-input>
+                <el-table :data="businessData" @row-click="businessSelect" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
+                  <el-table-column width="260" label="客户名称">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.companyName?scope.row.companyName:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column  label="客户地址">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="200"  label="客户税号">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.taxNum?scope.row.taxNum:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference" :disabled="form.enterprisename === ''">工商查询</el-button>
+              </el-popover>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="优势信息:" >
                 <el-input type="textarea" rows="5" v-model="form.advantage" placeholder="请输入优势信息"></el-input>
@@ -54,7 +77,8 @@
         </el-row>
       </div>
       <div class="fixed__btn__panel">
-        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
+        <duplicateCheck  ref="check" :data="form" @onSuccess="onClose"></duplicateCheck>
         <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -62,15 +86,27 @@
 </template>
 
 <script>
+import duplicateCheck from "@/components/duplicatesCheck/competitorCheck";
 export default {
   name: "add",
+  components:{duplicateCheck},
   data(){
     return {
       dialogFormVisible:false,
       visible:false,
+      businessData:[],
+      businessParam:{
+        "id": 20221208103601,
+        "content": {
+          "pageNumber":1,
+          "pageSize":5,
+          "keyword":''
+        },
+      },
+      businessShow:false,
       form: {
         sa_competitorid:0,
-        sys_enterpriseid:"",
+        sys_enterpriseid:0,
         enterprisename:"",
         brandname:"",
         inferiority:"",
@@ -95,31 +131,45 @@ export default {
     onShow () {
       this.dialogFormVisible = true
     },
+    /*工商查询*/
+    async businessSearch(){
+      this.businessParam.content.keyword = this.form.enterprisename
+      const res = await this.$api.requested(this.businessParam)
+      console.log(res,"工商查询结果")
+      this.businessData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      this.businessShow = true
+    },
+    /*选择工商信息*/
+    businessSelect(val){
+      console.log("选择的工商信息",val)
+      this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.businessShow = false
+        this.form.enterprisename = val.companyName
+        this.form.address = val.address
+        this.form.taxno = val.taxNum
+        this.value = [val.regProvince,val.regCity,val.regArea]
+        this.form.province = val.regProvince
+        this.form.city = val.regCity
+        this.form.county = val.regArea
+        this.form.contact = val.legalPerson
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消更新'
+        });
+      })
+    },
     onSubmit(){
-      if (this.form.sys_enterpriseid === ''){
-        this.form.sys_enterpriseid = 0
-      }
-      this.$refs['form'].validate(async (valid) => {
+      this.$refs.form.validate((valid) => {
         if (!valid) return false
-        const res = await this.$api.requested({
-          "id": 20221018164102,
-          "content": this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.$emit('onSuccess')
-          this.$refs['form'].resetFields();
-          this.form = {
-            sa_competitorid:0,
-            sys_enterpriseid:"",
-            enterprisename:"",
-            brandname:"",
-            inferiority:"",
-            advantage:"",
-            remarks:"",
-            enterpriseid:""
-          }
-          this.dialogFormVisible = false
-        })
+        this.$refs.check.creatShow = true
+        this.$refs.check.listData()
       })
     },
     async queryEnterpriseArchives () {
@@ -167,6 +217,7 @@ export default {
         remarks:"",
         enterpriseid:""
       }
+      this.$emit('onSuccess')
     }
   }
 }

+ 196 - 0
src/Form/competitor/addCopy.vue

@@ -0,0 +1,196 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="onShow">新 建</el-button>
+    <el-drawer
+        title="创建竞争对手"
+        :visible.sync="dialogFormVisible"
+        size="600px"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        @close="onClose">
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini" >
+            <el-col :span="24">
+              <el-form-item label="品牌名称:" prop="brandname">
+                <el-input v-model="form.brandname" placeholder="请输入品牌名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="企业名称:" prop="enterprisename">
+                <el-popover
+                    placement="bottom"
+                    width="100%"
+                    v-model="visible">
+                  <div>
+                    <ul class="enterprisePanel">
+                      <li v-for="item in ENlist" :key="item.sys_enterpriseid" @click="chooseEnterprise(item)">
+                        <p>{{item.enterprisename}}</p>
+                        <small>{{item.province}}-{{item.city}}-{{item.county}}</small>
+                      </li>
+                    </ul>
+                  </div>
+                  <el-input slot="reference" v-model="form.enterprisename" @focus="queryEnterpriseArchives" @input.native="onChange"  placeholder="输入企业名称" clearable></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="优势信息:" >
+                <el-input type="textarea" rows="5" v-model="form.advantage" placeholder="请输入优势信息"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="劣势信息:" >
+                <el-input type="textarea" rows="5" v-model="form.inferiority" placeholder="请输入劣势信息"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注:" >
+                <el-input type="textarea" rows="5" v-model="form.remarks" placeholder="请输入备注信息"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "add",
+  data(){
+    return {
+      dialogFormVisible:false,
+      visible:false,
+      form: {
+        sa_competitorid:0,
+        sys_enterpriseid:"",
+        enterprisename:"",
+        brandname:"",
+        inferiority:"",
+        advantage:"",
+        remarks:"",
+        enterpriseid:""
+      },
+      rules:{
+        brandname: [
+          { required: true, message: '请输入品牌名称', trigger: 'blur' },
+        ],
+        enterprisename: [
+          { required: true, message: '请输入企业名称', trigger: 'blur,change' },
+        ]
+      },
+      ENlist:[],
+    }
+  },
+  mounted() {
+  },
+  methods:{
+    onShow () {
+      this.dialogFormVisible = true
+    },
+    onSubmit(){
+      if (this.form.sys_enterpriseid === ''){
+        this.form.sys_enterpriseid = 0
+      }
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221018164102,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.$refs['form'].resetFields();
+          this.form = {
+            sa_competitorid:0,
+            sys_enterpriseid:"",
+            enterprisename:"",
+            brandname:"",
+            inferiority:"",
+            advantage:"",
+            remarks:"",
+            enterpriseid:""
+          }
+          this.dialogFormVisible = false
+        })
+      })
+    },
+    async queryEnterpriseArchives () {
+      const res = await this.$api.requested({
+        "id": 20220920083901,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": this.form.enterprisename
+          }
+        }
+      })
+      this.ENlist = res.data
+    },
+    onChange () {
+      this.visible = true
+      this.debounce(this.queryEnterpriseArchives,500)()
+    },
+    debounce (fn, wait) {
+      let timer = 0
+      return function () {
+        if (timer !== null) clearTimeout(timer)
+        timer = setTimeout(fn, wait)
+      }
+    },
+    chooseEnterprise (item) {
+      this.visible = false
+      this.form.enterprisename = item.enterprisename
+      this.form.sys_enterpriseid = item.sys_enterpriseid
+
+      item.province = `${item.province}-${item.city}-${item.county}`
+      this.enterprise = item
+    },
+    onClose(){
+      this.dialogFormVisible = false
+      this.$refs['form'].resetFields()
+      this.form = {
+        sa_competitorid:0,
+        sys_enterpriseid:"",
+        enterprisename:"",
+        brandname:"",
+        inferiority:"",
+        advantage:"",
+        remarks:"",
+        enterpriseid:""
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.enterprisePanel {
+  max-height: 400px;
+  overflow-y: scroll;
+}
+.enterprisePanel li{
+  padding: 10px;
+  cursor: pointer;
+  line-height: 25px;
+}
+.enterprisePanel li small{
+  color: #999;
+}
+.enterprisePanel li:hover{
+  background: #f1f2f3;
+}
+.enterpriseText{
+  height: 34px;
+  line-height: 34px;
+  font-weight: 500;
+}
+</style>

+ 104 - 28
src/Form/competitor/edit.vue

@@ -17,24 +17,47 @@
                 <el-input v-model="form.brandname" placeholder="请输入品牌名称"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
+            <el-col :span="20">
               <el-form-item label="企业名称:" prop="enterprisename">
-                <el-popover
-                    placement="bottom"
-                    width="100%"
-                    v-model="visible">
-                  <div>
-                    <ul class="enterprisePanel">
-                      <li v-for="item in ENlist" :key="item.sys_enterpriseid" @click="chooseEnterprise(item)">
-                        <p>{{item.enterprisename}}</p>
-                        <small>{{item.province}}-{{item.city}}-{{item.county}}</small>
-                      </li>
-                    </ul>
-                  </div>
-                  <el-input slot="reference" v-model="form.enterprisename" @focus="queryEnterpriseArchives" @input.native="onChange"  placeholder="输入企业名称" clearable></el-input>
-                </el-popover>
+                <el-input  v-model="form.enterprisename"  placeholder="输入企业名称" clearable></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="4">
+              <el-popover
+                  placement="right"
+                  width="900"
+                  v-model="businessShow"
+                  trigger="manual">
+                <el-input
+                    style="width:300px;margin-bottom: 10px"
+                    placeholder="请输入内容"
+                    v-model="form.enterprisename"
+                    clearable
+                    @clear="businessSearch"
+                    size="mini"
+                    @keyup.enter.native="businessSearch">
+                  <i slot="prefix" class="el-icon-search" @click="businessSearch"></i>
+                </el-input>
+                <el-table :data="businessData" @row-click="businessSelect" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
+                  <el-table-column width="260" label="客户名称">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.companyName?scope.row.companyName:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column  label="客户地址">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="200"  label="客户税号">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.taxNum?scope.row.taxNum:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference" :disabled="form.enterprisename === ''">工商查询</el-button>
+              </el-popover>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="优势信息:" >
                 <el-input type="textarea" rows="5" v-model="form.advantage" placeholder="请输入优势信息"></el-input>
@@ -55,6 +78,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
+        <duplicateCheck  ref="check" :data="form" @onSuccess="onClose"></duplicateCheck>
         <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -62,12 +86,24 @@
 </template>
 
 <script>
+import duplicateCheck from "@/components/duplicatesCheck/competitorCheck";
 export default {
   name: "edit",
   props:['data','btnType'],
+  components:{duplicateCheck},
   data(){
     return {
       dialogFormVisible:false,
+      businessData:[],
+      businessParam:{
+        "id": 20221208103601,
+        "content": {
+          "pageNumber":1,
+          "pageSize":5,
+          "keyword":''
+        },
+      },
+      businessShow:false,
       form:{
         sa_competitorid:'',
         sys_enterpriseid:"",
@@ -94,21 +130,46 @@ export default {
       this.dialogFormVisible = true
       this.form = this.data
     },
+    /*工商查询*/
+    async businessSearch(){
+      this.businessParam.content.keyword = this.form.enterprisename
+      const res = await this.$api.requested(this.businessParam)
+      console.log(res,"工商查询结果")
+      this.businessData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      this.businessShow = true
+    },
+    /*选择工商信息*/
+    businessSelect(val){
+      console.log("选择的工商信息",val)
+      this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.businessShow = false
+        this.form.enterprisename = val.companyName
+        this.form.address = val.address
+        this.form.taxno = val.taxNum
+        this.value = [val.regProvince,val.regCity,val.regArea]
+        this.form.province = val.regProvince
+        this.form.city = val.regCity
+        this.form.county = val.regArea
+        this.form.contact = val.legalPerson
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消更新'
+        });
+      })
+    },
     onSubmit(){
-      if (this.form.sys_enterpriseid === ''){
-        this.form.sys_enterpriseid = 0
-      }
-      this.$refs['form'].validate(async (valid) => {
+      this.$refs.form.validate((valid) => {
         if (!valid) return false
-        const res = await this.$api.requested({
-          "id": 20221018164102,
-          "content": this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.$emit('onSuccess')
-          this.$refs['form'].resetFields()
-          this.dialogFormVisible = false
-        })
+        this.$refs.check.creatShow = true
+        this.$refs.check.buttonTitle = '确定保存'
+        this.$refs.check.listData()
       })
     },
     async queryEnterpriseArchives () {
@@ -124,6 +185,21 @@ export default {
       })
       this.ENlist = res.data
     },
+    onClose(){
+      this.dialogFormVisible = false
+      this.$refs['form'].resetFields()
+      this.form = {
+        sa_competitorid:0,
+        sys_enterpriseid:"",
+        enterprisename:"",
+        brandname:"",
+        inferiority:"",
+        advantage:"",
+        remarks:"",
+        enterpriseid:""
+      }
+      this.$emit('onSuccess')
+    },
     onChange () {
       this.visible = true
       this.debounce(this.queryEnterpriseArchives,500)()

+ 166 - 0
src/Form/competitor/editCopy.vue

@@ -0,0 +1,166 @@
+<template>
+  <div>
+    <el-button size="mini" type="primary"   @click="show" >编 辑</el-button>
+    <el-drawer
+        title="编辑竞争对手"
+        :visible.sync="dialogFormVisible"
+        size="600px"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        @close="dialogFormVisible = false">
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini">
+            <el-col :span="24">
+              <el-form-item label="品牌名称:" prop="brandname">
+                <el-input v-model="form.brandname" placeholder="请输入品牌名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="企业名称:" prop="enterprisename">
+                <el-popover
+                    placement="bottom"
+                    width="100%"
+                    v-model="visible">
+                  <div>
+                    <ul class="enterprisePanel">
+                      <li v-for="item in ENlist" :key="item.sys_enterpriseid" @click="chooseEnterprise(item)">
+                        <p>{{item.enterprisename}}</p>
+                        <small>{{item.province}}-{{item.city}}-{{item.county}}</small>
+                      </li>
+                    </ul>
+                  </div>
+                  <el-input slot="reference" v-model="form.enterprisename" @focus="queryEnterpriseArchives" @input.native="onChange"  placeholder="输入企业名称" clearable></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="优势信息:" >
+                <el-input type="textarea" rows="5" v-model="form.advantage" placeholder="请输入优势信息"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="劣势信息:" >
+                <el-input type="textarea" rows="5" v-model="form.inferiority" placeholder="请输入劣势信息"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注:" >
+                <el-input type="textarea" rows="5" v-model="form.remarks" placeholder="请输入备注信息"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "edit",
+  props:['data','btnType'],
+  data(){
+    return {
+      dialogFormVisible:false,
+      form:{
+        sa_competitorid:'',
+        sys_enterpriseid:"",
+        enterprisename:"",
+        brandname:"",
+        inferiority:"",
+        advantage:"",
+        remarks:""
+      },
+      rules:{
+        brandname: [
+          { required: true, message: '请输入品牌名称', trigger: 'blur' },
+        ],
+        enterprisename: [
+          { required: true, message: '请输入企业名称', trigger: 'blur,change' },
+        ]
+      },
+      visible:false,
+      ENlist:[],
+    }
+  },
+  methods:{
+    show(){
+      this.dialogFormVisible = true
+      this.form = this.data
+    },
+    onSubmit(){
+      if (this.form.sys_enterpriseid === ''){
+        this.form.sys_enterpriseid = 0
+      }
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221018164102,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.$refs['form'].resetFields()
+          this.dialogFormVisible = false
+        })
+      })
+    },
+    async queryEnterpriseArchives () {
+      const res = await this.$api.requested({
+        "id": 20220920083901,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": this.form.enterprisename
+          }
+        }
+      })
+      this.ENlist = res.data
+    },
+    onChange () {
+      this.visible = true
+      this.debounce(this.queryEnterpriseArchives,500)()
+    },
+    debounce (fn, wait) {
+      let timer = 0
+      return function () {
+        if (timer !== null) clearTimeout(timer)
+        timer = setTimeout(fn, wait)
+      }
+    },
+    chooseEnterprise (item) {
+      this.visible = false
+      this.form.enterprisename = item.enterprisename
+      this.form.sys_enterpriseid = item.sys_enterpriseid
+
+      item.province = `${item.province}-${item.city}-${item.county}`
+      this.enterprise = item
+    },
+  }
+}
+</script>
+
+<style scoped>
+.enterprisePanel {
+  max-height: 400px;
+  overflow-y: scroll;
+}
+.enterprisePanel li{
+  padding: 10px;
+  cursor: pointer;
+  line-height: 25px;
+}
+.enterprisePanel li small{
+  color: #999;
+}
+.enterprisePanel li:hover{
+  background: #f1f2f3;
+}
+</style>

+ 1 - 0
src/HDrpManagement/competitor/detail/index.vue

@@ -67,6 +67,7 @@ export default {
         },
       })
       this.mainData = res.data
+      this.$refs.details.refreshTag()
       this.$refs['details'].param.content.isExport = false
       this.$refs['details'].param.content.sa_competitorid = [this.mainData.sa_competitorid]
       this.changeDataStructure()

+ 1 - 1
src/HManagement/accountManage/modules/account_detail.vue

@@ -11,7 +11,7 @@
       idname="userid"
       ownertable="sys_users"
       tags=""
-      :tabs="[this.mainData.usertype === 1 || this.mainData.usertype === 0 ? '人员信息' : '基本信息','团队信息','角色信息']"
+      :tabs="[this.mainData.usertype === 1 || this.mainData.usertype === 0 ? '人员信息' : '基本信息','业务代理人','角色信息']"
       @pageChange="pageChange"
       @onEditSuccess="queryMainData($route.query.id)">
       <div slot="customOperation" >

+ 2 - 1
src/HManagement/accountManage/modules/teamInformation/add.vue

@@ -129,7 +129,8 @@ export default {
         "content":{
           "editable":1,
           "userid":row.userid,
-          "leaderuserid":this.$route.query.id
+          "leaderuserid":this.$route.query.id,
+          "isproxy":1,
         }
       })
       this.tool.showMessage(res,()=>{

+ 1 - 0
src/HManagement/accountManage/modules/teamInformation/detail.vue

@@ -99,6 +99,7 @@ export default {
       param:{
         "id": 20230302174201,
         "content": {
+          "isproxy":1,
           "leaderuserid":'',
         }
       }

+ 8 - 4
src/HManagement/accountManage/modules/teamInformation/index.vue

@@ -90,7 +90,8 @@ export default {
         params:{
           "id": 20230302174201,
           "content": {
-            "leaderuserid":""
+            "leaderuserid":"",
+            "isproxy":1,
           }
         },
         list:[],
@@ -101,7 +102,8 @@ export default {
         params:{
           "id": 20230302174501,
           "content": {
-            "leaderuserid":""
+            "leaderuserid":"",
+            "isproxy":1,
           }
         },
         list:[],
@@ -177,7 +179,8 @@ export default {
         "content":{
           "editable":this.isEdit,
           "userid":this.row.userid,
-          "leaderuserid":this.$route.query.id
+          "leaderuserid":this.$route.query.id,
+          "isproxy":1,
         }
       })
       this.tool.showMessage(res,()=>{
@@ -190,7 +193,8 @@ export default {
         "id":"20230302174401",
         "content":{
           "userid":row.userid,
-          "leaderuserid":this.$route.query.id
+          "leaderuserid":this.$route.query.id,
+          "isproxy":1,
         }
       })
       this.tool.showMessage(res,()=>{

+ 186 - 0
src/components/duplicatesCheck/competitorCheck.vue

@@ -0,0 +1,186 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="listData" class="inline-16 normal-btn-width">查 重</el-button>
+    <el-dialog title="重复竞争对手" :visible.sync="dialogTableVisible" append-to-body width="1000px">
+      <tableLayout :layout="tablecols"   :data="list" :opwidth="200" height="calc(100vh - 550px)" :width="true" :custom="true">
+        <template v-slot:customcol="scope">
+          <p >{{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" v-if="creatShow">
+        <el-button @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>
+</template>
+
+<script>
+import tableLayout from '@/components/table/index5'
+export default {
+  components:{tableLayout},
+  name: "customerCheck",
+  props:["data"],
+  data(){
+    return {
+      dialogTableVisible:false,
+      list:[],
+      tablecols:[],
+      total:0,
+      currentPage:0,
+      duplicates:false,
+      creatShow:false,
+      message:'该竞争对手疑似重复,是否确认创建竞争对手?',
+      buttonTitle:'确定创建',
+      param:{
+        "id": 20230324132602,
+        "content": {
+          "sa_competitorid":"",
+          "enterprisename":"",
+        },
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      this.param.content.sa_competitorid = this.data.sa_competitorid || 0
+      this.param.content.enterprisename = this.data.enterprisename
+      const res = await this.$api.requested(this.param)
+      if (res.total > 0){
+        this.list = res.data
+        this.total = res.total
+        this.currentPage = res.pageNumber
+        this.dialogTableVisible = true
+      }else {
+        if (this.creatShow){
+          this.onSubmit()
+        }else {
+          this.$message({
+            message: '无重复数据',
+            type: 'success'
+          });
+        }
+      }
+    },
+    onCheck(){
+      if (this.buttonTitle === '确定保存'){
+        this.message = '该竞争对手疑似重复,是否确认更新竞争对手?'
+      }else {
+        this.message = '该竞争对手疑似重复,是否确认创建竞争对手?'
+      }
+      this.$confirm(this.message, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.duplicates = true
+        this.onSubmit()
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        });
+      });
+    },
+    async onSubmit(){
+      const res = await this.$api.requested({
+        "id": 20221018164102,
+        "content": this.data
+      })
+      this.tool.showMessage(res,()=>{
+        console.log(this.duplicates,'duplicates')
+        if (this.duplicates){
+          if (this.buttonTitle === '确定保存'){
+            this.tagData(res.data.sa_competitorid)
+          }else {
+            let data = ['疑似重复']
+            this.setTag(res.data.sa_competitorid,data)
+          }
+        }else {
+          this.$emit('onSuccess')
+         /* this.setTag(res.data.sa_customersid,'')*/
+        }
+      })
+    },
+    async setTag(id,data){
+      console.log(id,data,'设置标签')
+      const res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+          "ownertable":"sa_competitor",
+          "ownerid":id,
+          "datatag":data
+        }
+      })
+      this.dialogTableVisible = false
+      this.duplicates = false
+      this.$emit('onSuccess')
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    // 获取标签数据
+    async tagData(id){
+      const res = await this.$api.requested({
+        content: {
+          ownertable: "sa_competitor",
+          ownerid: this.$route.query.id
+        },
+        id: 20220929085401
+      })
+      console.log(res,'获取标签')
+      console.log(this.duplicates)
+      var resTagData = []
+      resTagData = res.data.datatag
+     if (this.duplicates){
+       let flag = 0
+       for (var i=0;i<res.data.datatag.length;i++){
+         if (res.data.datatag[i] === '疑似重复'){
+           flag = 1
+           break
+         }
+       }
+       if (flag === 1){
+         this.setTag(id,resTagData)
+       }else {
+         resTagData.push('疑似重复')
+         this.setTag(id,resTagData)
+       }
+     }else {
+       for (var k=0;k<res.data.datatag.length;k++){
+         if (res.data.datatag[k] === '疑似重复'){
+           resTagData.splice(k)
+           break
+         }
+       }
+       this.setTag(id,resTagData)
+     }
+    },
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).duplicatesCompetitorTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 2
src/components/table/index5.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
-    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height" @row-click="rowClick" style="width:100%;min-height:910px;" :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
-              :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
+    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="data.length <= 4?'260px':data.length <= 20?'':'calc(100vh - 420px)'" @row-click="rowClick" style="width:100%;min-height:260px;max-height: calc(100vh - 420px)" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
           type="selection"
           width="35" fixed v-if="checkbox">