|
@@ -380,14 +380,14 @@
|
|
|
<el-table :data="customer.customerData" @row-click="customerData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
|
|
|
<el-table-column
|
|
|
label="客户编号"
|
|
|
- width="180">
|
|
|
+ width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="客户名称"
|
|
|
- width="200">
|
|
|
+ width="260">
|
|
|
<template slot-scope="scope">
|
|
|
<span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
|
|
|
</template>
|
|
@@ -406,7 +406,7 @@
|
|
|
small
|
|
|
@size-change="handleSizeChangeCustomer"
|
|
|
@current-change="handleCurrentChangeCustomer"
|
|
|
- :page-sizes="[10,20,50,100,]"
|
|
|
+ :page-sizes="[20,50,100,]"
|
|
|
layout="total,sizes, prev, pager, next, jumper"
|
|
|
:current-page="customer.currentPage"
|
|
|
:total="customer.total">
|
|
@@ -423,14 +423,59 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="归属经销商:" prop="sa_agentsid">
|
|
|
- <el-select v-model="form.sa_agentsid" placeholder="请选择经销商" style="width: 100%">
|
|
|
- <el-option
|
|
|
- v-for="item in options.distributor"
|
|
|
- :key="item.sa_agentsid"
|
|
|
- :label="item.enterprisename "
|
|
|
- :value="item.sa_agentsid">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-popover
|
|
|
+ placement="bottom"
|
|
|
+ width="700"
|
|
|
+ trigger="click"
|
|
|
+ v-model="agentsShow"
|
|
|
+ @show="queryAgents">
|
|
|
+ <el-input
|
|
|
+ style="width:300px;margin-bottom: 10px"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="agentsParam.content.where.condition"
|
|
|
+ clearable
|
|
|
+ @clear="queryAgents(agentsParam.content.pageNumber = 1)"
|
|
|
+ size="mini"
|
|
|
+ @keyup.enter.native="queryAgents(agentsParam.content.pageNumber = 1)">
|
|
|
+ <i slot="prefix" class="el-icon-search" @click="queryAgents(agentsParam.content.pageNumber = 1)"></i>
|
|
|
+ </el-input>
|
|
|
+ <el-table :data="agents.agentsData" @row-click="agentsData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
|
|
|
+ <el-table-column
|
|
|
+ label="经销商编码"
|
|
|
+ width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span style="margin-left: 10px">{{ scope.row.agentnum?scope.row.agentnum:'--' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="经销商名称"
|
|
|
+ width="260">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</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>
|
|
|
+ <div class="container normal-panel" style="text-align:right">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ small
|
|
|
+ @size-change="handleSizeChangeAgent"
|
|
|
+ @current-change="handleCurrentChangeAgent"
|
|
|
+ :page-sizes="[20,50,100,]"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
+ :current-page="agents.currentPage"
|
|
|
+ :total="agents.total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <el-input slot="reference" :readonly="true" v-model="form.agentname" autocomplete="off" placeholder="请选择经销商" @input="selectAgents"></el-input>
|
|
|
+ </el-popover>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-form>
|
|
@@ -505,6 +550,7 @@ export default {
|
|
|
telephone: "",
|
|
|
sa_agentsid: "",
|
|
|
erpagentnum:"",
|
|
|
+ agentname:'',
|
|
|
contactsinfo: {
|
|
|
name: "",
|
|
|
telephone: "",
|
|
@@ -555,7 +601,7 @@ export default {
|
|
|
"id": 20220920083901,
|
|
|
"content": {
|
|
|
"pageNumber": 1,
|
|
|
- "pageSize": 10,
|
|
|
+ "pageSize": 20,
|
|
|
"where": {
|
|
|
"condition": "",
|
|
|
"type":2,
|
|
@@ -568,6 +614,23 @@ export default {
|
|
|
total:0,
|
|
|
currentPage:0,
|
|
|
},
|
|
|
+ agentsShow:false,
|
|
|
+ agentsParam:{
|
|
|
+ "id": 20230214162602,
|
|
|
+ "content": {
|
|
|
+ "hrid": '',
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 20,
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ agents:{
|
|
|
+ agentsData:[],
|
|
|
+ total:0,
|
|
|
+ currentPage:0,
|
|
|
+ },
|
|
|
isPhone:true,
|
|
|
enterpriseContact:{
|
|
|
param:{
|
|
@@ -616,13 +679,14 @@ export default {
|
|
|
},
|
|
|
methods:{
|
|
|
show(){
|
|
|
+ this.form.agentname = ''
|
|
|
+ this.form.sa_agentsid = ''
|
|
|
this.dialogFormVisible = true
|
|
|
this.typeList()
|
|
|
/*this.parentCustomer()*/
|
|
|
this.gradeList()
|
|
|
this.industryList()
|
|
|
this.queryCustomerGrade()
|
|
|
- this.queryDistributor()
|
|
|
this.enterpriseContactList()
|
|
|
},
|
|
|
/*工商查询*/
|
|
@@ -711,6 +775,8 @@ export default {
|
|
|
onClose () {
|
|
|
this.form.contactsinfo.telephone = ''
|
|
|
this.form.contactsinfo.phonenumber = ''
|
|
|
+ this.form.agentname = ''
|
|
|
+ this.form.sa_agentsid = ''
|
|
|
this.isPhone = true
|
|
|
this.$refs['form'].resetFields();
|
|
|
this.dialogFormVisible = false
|
|
@@ -853,23 +919,42 @@ export default {
|
|
|
this.options.industryData = res.data
|
|
|
},
|
|
|
/*所属经销商*/
|
|
|
- async queryDistributor(){
|
|
|
+ async queryAgents(){
|
|
|
var sessionData = sessionStorage.getItem('active_account')
|
|
|
- sessionData = JSON.parse(sessionData)
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": 20230214162602,
|
|
|
- "content": {
|
|
|
- "hrid": sessionData.hrid,
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 20,
|
|
|
- "where": {
|
|
|
- "condition": ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- this.options.distributor = res.data
|
|
|
- console.log(this.options.distributor,'经销商')
|
|
|
+ this.agentsParam.content.hrid = JSON.parse(sessionData).hrid
|
|
|
+ const res = await this.$api.requested(this.agentsParam)
|
|
|
+ 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
|
|
|
+ this.queryAgents()
|
|
|
+ },
|
|
|
+ /*客户选择信息*/
|
|
|
+ agentsData(val){
|
|
|
+ this.form.sa_agentsid = val.sa_agentsid
|
|
|
+ this.form.agentname = val.enterprisename
|
|
|
+ this.agentsShow = false
|
|
|
+ },
|
|
|
+ /*客户分页*/
|
|
|
+ handleSizeChangeAgent(val) {
|
|
|
+ // console.log(`每页 ${val} 条`);
|
|
|
+ this.agentsParam.content.pageSize = val
|
|
|
+ this.queryAgents()
|
|
|
+ },
|
|
|
+ handleCurrentChangeAgent(val) {
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
+ this.agentsParam.content.pageNumber = val
|
|
|
+ this.queryAgents()
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
phoneChang(val){
|
|
|
if (val === '座机'){
|
|
|
this.isPhone = false
|