|
@@ -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(){
|