瀏覽代碼

工商查询

qymljy 1 年之前
父節點
當前提交
edc7f64898

+ 7 - 52
src/Form/EnterpriseArchives/add.vue

@@ -11,43 +11,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="4">
-              <el-popover
-                  placement="right"
-                  width="900"
-                  v-model="businessShow"
-                  trigger="manual">
-                <div style="margin-bottom: 10px;display: flex;justify-content: space-between">
-                  <el-input
-                      style="width:300px;"
-                      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-button style="color: #333333;" size="mini" @click="businessShow = false">关闭</el-button>
-                </div>
-                <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>
+              <businessInquiry ref="businessRef" @businessData="businessSelect" :keyword="form.enterprisename"></businessInquiry>
             </el-col>
             <el-col :span="12">
               <el-form-item label="联系人" prop="contact">
@@ -143,7 +107,9 @@
 
 <script>
 import {mapGetters} from 'vuex'
+import businessInquiry from '@/template/businessInquiry/index'
 export default {
+  components:{businessInquiry},
   data () {
     return {
       radio:-1,
@@ -242,34 +208,23 @@ export default {
         })
      })
     },
-    /*工商查询*/
-    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)
+    businessSelect(val,regProvince){
       this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.businessShow = false
+        this.$refs.businessRef.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,val.regCity,val.regArea]
+        this.form.province = [regProvince,val.regCity,val.regArea]
         this.form.city = val.regCity
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
       }).catch(() => {
+        this.$refs.businessRef.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'

+ 7 - 41
src/Form/EnterpriseArchives/edit.vue

@@ -11,43 +11,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="4">
-              <el-popover
-                  placement="right"
-                  width="900"
-                  v-model="businessShow"
-                  trigger="manual">
-                <div style="margin-bottom: 10px;display: flex;justify-content: space-between">
-                  <el-input
-                      style="width:300px;"
-                      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-button style="color: #333333;" size="mini" @click="businessShow = false">关闭</el-button>
-                </div>
-                <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>
+              <businessInquiry ref="businessRef" @businessData="businessSelect" :keyword="form.enterprisename"></businessInquiry>
             </el-col>
             <el-col :span="12">
               <el-form-item label="联系人" prop="contact">
@@ -143,7 +107,9 @@
 
 <script>
 import {mapGetters} from 'vuex'
+import businessInquiry from '@/template/businessInquiry/index'
 export default {
+  components:{businessInquiry},
   props:['data'],
   data () {
     return {
@@ -268,22 +234,22 @@ export default {
       this.businessShow = true
     },
     /*选择工商信息*/
-    businessSelect(val){
+    businessSelect(val,regProvince){
       this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.businessShow = false
+        this.$refs.businessRef.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,val.regCity,val.regArea]
+        this.form.province = [regProvince,val.regCity,val.regArea]
         this.form.city = val.regCity
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
       }).catch(() => {
+        this.$refs.businessRef.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'

+ 8 - 43
src/Form/competitor/add.vue

@@ -23,43 +23,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="4">
-              <el-popover
-                  placement="right"
-                  width="900"
-                  v-model="businessShow"
-                  trigger="manual">
-                <div style="margin-bottom: 10px;display: flex;justify-content: space-between">
-                  <el-input
-                      style="width:300px;"
-                      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-button style="color: #333333;" size="mini" @click="businessShow = false">关闭</el-button>
-                </div>
-                <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>
+              <businessInquiry ref="businessRef" @businessData="businessSelect" :keyword="form.enterprisename"></businessInquiry>
             </el-col>
             <el-col :span="24">
               <el-form-item label="优势信息:" >
@@ -90,9 +54,10 @@
 
 <script>
 import duplicateCheck from "@/components/duplicatesCheck/competitorCheck";
+import businessInquiry from '@/template/businessInquiry/index'
 export default {
   name: "add",
-  components:{duplicateCheck},
+  components:{duplicateCheck,businessInquiry},
   data(){
     return {
       dialogFormVisible:false,
@@ -143,23 +108,23 @@ export default {
       this.businessShow = true
     },
     /*选择工商信息*/
-    businessSelect(val){
+    businessSelect(val,regProvince){
       this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.form.enterprisename = val.companyName
         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
+        this.value = [regProvince,val.regCity,val.regArea]
+        this.form.province = regProvince
         this.form.city = val.regCity
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
       }).catch(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'

+ 8 - 43
src/Form/competitor/edit.vue

@@ -23,43 +23,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="4">
-              <el-popover
-                  placement="right"
-                  width="900"
-                  v-model="businessShow"
-                  trigger="manual">
-                <div style="margin-bottom: 10px;display: flex;justify-content: space-between">
-                  <el-input
-                      style="width:300px;"
-                      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-button style="color: #333333;" size="mini" @click="businessShow = false">关闭</el-button>
-                </div>
-                <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>
+              <businessInquiry ref="businessRef" @businessData="businessSelect" :keyword="form.enterprisename"></businessInquiry>
             </el-col>
             <el-col :span="24">
               <el-form-item label="优势信息:" >
@@ -90,10 +54,11 @@
 
 <script>
 import duplicateCheck from "@/components/duplicatesCheck/competitorCheck";
+import businessInquiry from '@/template/businessInquiry/index'
 export default {
   name: "edit",
   props:['data','btnType'],
-  components:{duplicateCheck},
+  components:{duplicateCheck,businessInquiry},
   data(){
     return {
       dialogFormVisible:false,
@@ -143,23 +108,23 @@ export default {
       this.businessShow = true
     },
     /*选择工商信息*/
-    businessSelect(val){
+    businessSelect(val,regProvince){
       this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.form.enterprisename = val.companyName
         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
+        this.value = [regProvince,val.regCity,val.regArea]
+        this.form.province = regProvince
         this.form.city = val.regCity
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
       }).catch(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'

+ 9 - 93
src/Form/publicCustomer/add.vue

@@ -19,65 +19,13 @@
               </el-form-item>
             </el-col>
             <el-col :span="4">
-              <el-popover
-                  placement="right"
-                  width="900"
-                  v-model="businessShow"
-                  trigger="manual">
-                <div style="margin-bottom: 10px;display: flex;justify-content: space-between">
-                  <el-input
-                      style="width:300px;"
-                      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-button style="color: #333333;" size="mini" @click="businessShow = false">关闭</el-button>
-                </div>
-                <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>
-                <!--                <div class="container normal-panel" style="text-align:right">
-                                  <el-pagination
-                                      background
-                                      @size-change="handleSizeChange"
-                                      @current-change="handleCurrentChange"
-                                      :current-page="currentPage"
-                                      :page-sizes="[5]"
-                                      layout="total,sizes, prev, pager, next, jumper"
-                                      :total="total">
-                                  </el-pagination>
-                                </div>-->
-                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference" :disabled="form.enterprisename === ''">工商查询</el-button>
-              </el-popover>
+              <businessInquiry ref="businessRef" @businessData="businessSelect" :keyword="form.enterprisename"></businessInquiry>
             </el-col>
             <el-col :span="24">
               <el-form-item label="企业简称:" prop="abbreviation">
                 <el-input v-model="form.abbreviation" placeholder="企业简称"></el-input>
               </el-form-item>
             </el-col>
-<!--            <el-col :span="24">
-              <el-form-item label="erp编号:" prop="erpagentnum">
-                <el-input v-model="form.erpagentnum" placeholder="请输入erp编号" style="width: 100%"></el-input>
-              </el-form-item>
-            </el-col>-->
             <el-col :span="24">
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" size="small">
@@ -86,8 +34,6 @@
                     :key="item.value"
                     :label="item.value"
                     :value="item.value">
-<!--                    <span style="float: left">{{ item.value }}</span>
-                    <span v-if="item.remarks !== ''" style="float: right; color: #8492a6; font-size: 10px">{{ item.remarks }}</span>-->
                     <span style="float: left">{{ item.value }}</span>
                     <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
                   </el-option>
@@ -155,8 +101,6 @@
             <el-col :span="24" v-if="isPhone">
               <el-form-item label="联系方式:" prop="contactsinfo.phonenumber">
                 <el-button-group>
-                  <!--                  <el-button type="primary" size="mini" @click="phoneChang('手机')">手机号</el-button>
-                                    <el-button type="" size="mini" @click="phoneChang('座机')">座机电话</el-button>-->
                   <el-radio v-model="isPhone" :label="true" @change="phoneChang('手机')">手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
@@ -166,8 +110,6 @@
             <el-col :span="24" v-if="!isPhone">
               <el-form-item label="联系方式:" prop="contactsinfo.telephone">
                 <el-button-group>
-                  <!--                  <el-button type="" size="mini" @click="phoneChang('手机')">手机号</el-button>
-                                    <el-button type="primary" size="mini" @click="phoneChang('座机')">座机电话</el-button>-->
                   <el-radio v-model="isPhone" :label="true" @change="phoneChang('手机')">手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
@@ -299,11 +241,12 @@
 <script>
 import duplicateCheck from "@/components/duplicatesCheck/publicCustomerCheck";
 import contactsNewTemplate from '@/template/contactsNewTemplate/index'
+import businessInquiry from '@/template/businessInquiry/index'
 import {mapGetters} from "vuex";
 export default {
   name: "add",
   inject:['arealist'],
-  components:{duplicateCheck,contactsNewTemplate},
+  components:{duplicateCheck,contactsNewTemplate,businessInquiry},
   data(){
     return {
       activeName:'first',
@@ -480,40 +423,30 @@ export default {
       this.businessShow = true
     },
     /*选择工商信息*/
-    businessSelect(val){
-      console.log("选择的工商信息",val)
+    businessSelect(val,regProvince){
       this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.form.enterprisename = val.companyName
         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
+        this.value = [regProvince,val.regCity,val.regArea]
+        this.form.province = regProvince
         this.form.city = val.regCity
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
+        this.form.telephone = val.phone
       }).catch(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'
         });
       })
     },
-    /*handleSizeChange(val) {
-      // console.log(`每页 ${val} 条`);
-      this.param.content.pageSize = val
-      this.businessSearch()
-    },
-    handleCurrentChange(val) {
-      // console.log(`当前页: ${val}`);
-      this.param.content.pageNumber = val
-      this.businessSearch()
-    },*/
     /*查重检查*/
     onCheck(){
       this.$refs.form.validate((valid) => {
@@ -555,11 +488,6 @@ export default {
     onSubmit(){
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
-        /*if (this.form.province) {
-          this.form.city = this.form.province[1]
-          this.form.county = this.form.province[2]
-          this.form.province = this.form.province[0]
-        }*/
         const res = await this.$api.requested({
           "id": "20221010164302",
           "version":1,
@@ -598,9 +526,6 @@ export default {
           }else {
             this.setTag(res.data.sa_customersid)
           }
-
-          /*this.$router.push({path:'/PublicCustomerDetail',query:{id:res.data.sa_customersid,rowindex:0}})
-          this.$store.dispatch('changeDetailDrawer',true)*/
         })
       })
     },
@@ -722,16 +647,7 @@ export default {
           }
         }
       })
-      console.log("客户等级",res.data)
-      /*for (var i=0;i<res.data.length; i++){
-        if (res.data[i].remarks !== ''){
-          this.options.gradeData[i] = res.data[i].value + "——" + res.data[i].remarks
-        }else{
-          this.options.gradeData[i] = res.data[i].value
-        }
-      }*/
       this.options.customerClassification = res.data
-      console.log("处理后客户等级",this.options.customerClassification)
     },
     /*客户等级*/
     queryCustomerGrade(){

+ 8 - 74
src/Form/publicCustomer/edit.vue

@@ -19,65 +19,13 @@
               </el-form-item>
             </el-col>
             <el-col :span="4">
-              <el-popover
-                  placement="right"
-                  width="900"
-                  v-model="businessShow"
-                  trigger="manual">
-                <div style="margin-bottom: 10px;display: flex;justify-content: space-between">
-                  <el-input
-                      style="width:300px;"
-                      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-button style="color: #333333;" size="mini" @click="businessShow = false">关闭</el-button>
-                </div>
-                <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>
-                <!--                <div class="container normal-panel" style="text-align:right">
-                                  <el-pagination
-                                      background
-                                      @size-change="handleSizeChange"
-                                      @current-change="handleCurrentChange"
-                                      :current-page="currentPage"
-                                      :page-sizes="[5]"
-                                      layout="total,sizes, prev, pager, next, jumper"
-                                      :total="total">
-                                  </el-pagination>
-                                </div>-->
-                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference" :disabled="form.enterprisename === '' ">工商查询</el-button>
-              </el-popover>
+              <businessInquiry ref="businessRef" @businessData="businessSelect" :keyword="form.enterprisename"></businessInquiry>
             </el-col>
             <el-col :span="24">
               <el-form-item label="企业简称:" prop="abbreviation">
                 <el-input v-model="form.abbreviation" placeholder="企业简称"></el-input>
               </el-form-item>
             </el-col>
-<!--            <el-col :span="24">
-              <el-form-item label="erp编号:" prop="erpagentnum">
-                <el-input v-model="form.erpagentnum" placeholder="请输入erp编号" style="width: 100%"></el-input>
-              </el-form-item>
-            </el-col>-->
             <el-col :span="24">
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" size="small">
@@ -290,11 +238,12 @@
 
 <script>
 import duplicateCheck from "@/components/duplicatesCheck/publicCustomerCheck";
+import businessInquiry from '@/template/businessInquiry/index'
 import {mapGetters} from "vuex";
 export default {
   name: "add",
   inject:['arealist'],
-  components:{duplicateCheck},
+  components:{duplicateCheck,businessInquiry},
   data(){
     return {
       isPhone:true,
@@ -447,39 +396,29 @@ export default {
       this.businessShow = true
     },
     /*选择工商信息*/
-    businessSelect(val){
+    businessSelect(val,regProvince){
       this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.form.enterprisename = val.companyName
         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
+        this.form.value = [regProvince,val.regCity,val.regArea]
+        this.form.province = regProvince
         this.form.city = val.regCity
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
       }).catch(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'
         });
       })
     },
-    /*handleSizeChange(val) {
-      // console.log(`每页 ${val} 条`);
-      this.param.content.pageSize = val
-      this.businessSearch()
-    },
-    handleCurrentChange(val) {
-      // console.log(`当前页: ${val}`);
-      this.param.content.pageNumber = val
-      this.businessSearch()
-    },*/
     /*查重检查*/
     onCheck(){
       this.$refs.form.validate((valid) => {
@@ -521,11 +460,6 @@ export default {
     onSubmit(){
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
-        /*if (this.form.province) {
-          this.form.city = this.form.province[1]
-          this.form.county = this.form.province[2]
-          this.form.province = this.form.province[0]
-        }*/
         const res = await this.$api.requested({
           "id": "20221010164302",
           "version":1,

+ 1 - 35
src/Form/salerPrivatecustomer/add.vue

@@ -98,8 +98,6 @@
             <el-col :span="24" v-if="isPhone">
               <el-form-item label="联系方式:" prop="contactsinfo.phonenumber">
                 <el-button-group>
-<!--                  <el-button type="primary" size="mini" @click="phoneChang('手机')">手机号</el-button>
-                  <el-button type="" size="mini" @click="phoneChang('座机')">座机电话</el-button>-->
                   <el-radio v-model="isPhone" :label="true" @change="phoneChang('手机')">手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
@@ -109,8 +107,6 @@
             <el-col :span="24" v-if="!isPhone">
               <el-form-item label="联系方式:" prop="contactsinfo.telephone">
                 <el-button-group>
-<!--                  <el-button type="" size="mini" @click="phoneChang('手机')">手机号</el-button>
-                  <el-button type="primary" size="mini" @click="phoneChang('座机')">座机电话</el-button>-->
                   <el-radio v-model="isPhone" :label="true" @change="phoneChang('手机')">手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
@@ -277,7 +273,6 @@
       </div>
       <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" @onCheck="onCheck"></duplicateCheck>
         <el-button size="small" type="primary" :loading="loading" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
@@ -376,7 +371,7 @@ export default {
         ],
         telephone: [
           { required: false, message: '请输入联系电话', trigger: 'change' },
-          { pattern:/^1[3-9]\d{9}$/, message: '请输入正确手机号码',trigger: 'change' }
+          /*{ pattern:/^1[3-9]\d{9}$/, message: '请输入正确手机号码',trigger: 'change' }*/
         ],
         province: [
           { required: true, message: '请选择省市县', trigger: 'blur' },
@@ -615,27 +610,10 @@ export default {
     /*上级客户列表*/
     onEnterprise(data){
       this.visibleEnterprise = false
-      console.log("企业信息",data)
       this.form.parentid = data.sa_customersid
       this.form.superiorenterprisename = data.enterprisename
 
     },
-
-    /*/!*上级客户*!/
-    async parentCustomer(){
-      const res = await this.$api.requested({
-        "id": 20221014101002,
-        "content": {
-          "pageNumber": 1,
-          "pageSize": 20,
-          "where": {
-            "condition": ""
-          }
-        }
-      })
-      console.log(res)
-      this.options.parentCustomers = res.data
-    },*/
     /*省市县*/
     cascaderChange (val) {
       this.form.province = val[0]
@@ -644,8 +622,6 @@ export default {
 
       this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
       this.$refs.form.validateField('province')
-      console.log(val,'选择222')
-      console.log(this.value,'3333')
     },
     /*客户分类*/
     async gradeList(){
@@ -662,16 +638,7 @@ export default {
           }
         }
       })
-      console.log("客户等级",res.data)
-      /*for (var i=0;i<res.data.length; i++){
-        if (res.data[i].remarks !== ''){
-          this.options.gradeData[i] = res.data[i].value + "——" + res.data[i].remarks
-        }else{
-          this.options.gradeData[i] = res.data[i].value
-        }
-      }*/
       this.options.customerClassification = res.data
-      console.log("处理后客户等级",this.options.customerClassification)
     },
     /*客户等级*/
     queryCustomerGrade(){
@@ -704,7 +671,6 @@ export default {
       this.agents.agentsData = res.data
       this.agents.total = res.total
       this.agents.currentPage = res.pageNumber
-      console.log(this.agents.agentsData ,'经销商')
     },
     selectAgents(){
       this.agentsParam.content.where.condition = this.form.agentname

+ 9 - 86
src/Form/salerPrivatecustomer/edit.vue

@@ -18,65 +18,13 @@
               </el-form-item>
             </el-col>
             <el-col :span="4">
-              <el-popover
-                  placement="right"
-                  width="900"
-                  v-model="businessShow"
-                  trigger="manual">
-                <div style="margin-bottom: 10px;display: flex;justify-content: space-between">
-                  <el-input
-                      style="width:300px;"
-                      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-button style="color: #333333;" size="mini" @click="businessShow = false">关闭</el-button>
-                </div>
-                <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>
-                <!--                <div class="container normal-panel" style="text-align:right">
-                                  <el-pagination
-                                      background
-                                      @size-change="handleSizeChange"
-                                      @current-change="handleCurrentChange"
-                                      :current-page="currentPage"
-                                      :page-sizes="[5]"
-                                      layout="total,sizes, prev, pager, next, jumper"
-                                      :total="total">
-                                  </el-pagination>
-                                </div>-->
-                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference" :disabled="form.enterprisename === '' " >工商查询</el-button>
-              </el-popover>
+              <businessInquiry ref="businessRef" @businessData="businessSelect" :keyword="form.enterprisename"></businessInquiry>
             </el-col>
             <el-col :span="24">
               <el-form-item label="企业简称:" >
                 <el-input v-model="form.abbreviation" placeholder="请输入企业简称" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-<!--            <el-col :span="24">
-              <el-form-item label="erp编号:" prop="erpagentnum">
-                <el-input v-model="form.erpagentnum" placeholder="请输入erp编号" style="width: 100%"></el-input>
-              </el-form-item>
-            </el-col>-->
             <el-col :span="24">
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" style="width: 100%">
@@ -341,11 +289,12 @@
 <script>
 import enterprise from '@/SDrpManagement/salerPrivatecustomer/components/enterprise'
 import duplicateCheck from "@/components/duplicatesCheck/customerCheck";
+import businessInquiry from '@/template/businessInquiry/index'
 import {mapGetters} from "vuex";
 export default {
   name: "edit",
   props:['data','btnType'],
-  components:{enterprise,duplicateCheck},
+  components:{enterprise,duplicateCheck,businessInquiry},
   data(){
     return {
       isPhone:true,
@@ -540,41 +489,30 @@ export default {
       this.businessShow = true
     },
     /*选择工商信息*/
-    businessSelect(val){
-      console.log("选择的工商信息",val)
+    businessSelect(val,regProvince){
       this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.form.enterprisename = val.companyName
         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
+        this.form.value = [regProvince,val.regCity,val.regArea]
+        this.form.province = regProvince
         this.form.city = val.regCity
         this.form.county = val.regArea
         this.form.contact = val.legalPerson
-
+        this.form.telephone = val.phone
       }).catch(() => {
-        this.businessShow = false
+        this.$refs.businessRef.businessShow = false
         this.$message({
           type: 'info',
           message: '已取消更新'
         });
       })
     },
-    /*handleSizeChange(val) {
-      // console.log(`每页 ${val} 条`);
-      this.param.content.pageSize = val
-      this.businessSearch()
-    },
-    handleCurrentChange(val) {
-      // console.log(`当前页: ${val}`);
-      this.param.content.pageNumber = val
-      this.businessSearch()
-    },*/
     /*查重检查*/
     onCheck(){
       this.$refs.form.validate((valid) => {
@@ -682,21 +620,6 @@ export default {
       this.form.superiorenterprisename = data.enterprisename
 
     },
-    /*/!*上级客户*!/
-    async parentCustomer(){
-      const res = await this.$api.requested({
-        "id": 20221014101002,
-        "content": {
-          "pageNumber": 1,
-          "pageSize": 20,
-          "where": {
-            "condition": ""
-          }
-        }
-      })
-      console.log(res)
-      this.options.parentCustomers = res.data
-    },*/
     /*省市县*/
     cascaderChange (val) {
       this.form.province = val[0]