|
|
@@ -86,7 +86,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="客户名称:" label-width="100px" prop="enterprisename">
|
|
|
+ <el-form-item label="客户名称:" label-width="100px" prop="enterprisename" v-if="isQuotedPrice">
|
|
|
<el-popover
|
|
|
placement="bottom"
|
|
|
width="700"
|
|
|
@@ -142,6 +142,114 @@
|
|
|
</el-popover>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="客户名称:" label-width="100px" prop="enterprisename" v-if="!isQuotedPrice">
|
|
|
+ <el-popover
|
|
|
+ placement="bottom"
|
|
|
+ width="700"
|
|
|
+ trigger="click"
|
|
|
+ v-model="customerShow"
|
|
|
+ @show="customerList">
|
|
|
+ <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="客户" name="客户">
|
|
|
+ <el-input
|
|
|
+ style="width:300px;margin-bottom: 10px"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="customerParam.content.where.condition"
|
|
|
+ clearable
|
|
|
+ @clear="customerList(customerParam.content.pageNumber = 1)"
|
|
|
+ size="mini"
|
|
|
+ @keyup.enter.native="customerList(customerParam.content.pageNumber = 1)">
|
|
|
+ <i slot="prefix" class="el-icon-search" @click="customerList(customerParam.content.pageNumber = 1)"></i>
|
|
|
+ </el-input>
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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="handleSizeChangeCustomer"
|
|
|
+ @current-change="handleCurrentChangeCustomer"
|
|
|
+ :page-sizes="[10,20,50,100]"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
+ :current-page="customer.currentPage"
|
|
|
+ :total="customer.total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="经销商" name="经销商">
|
|
|
+ <el-input
|
|
|
+ style="width:300px;margin-bottom: 10px"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="customerParam.content.where.condition"
|
|
|
+ clearable
|
|
|
+ @clear="distributorList(customerParam.content.pageNumber = 1)"
|
|
|
+ size="mini"
|
|
|
+ @keyup.enter.native="distributorList(customerParam.content.pageNumber = 1)">
|
|
|
+ <i slot="prefix" class="el-icon-search" @click="distributorList(customerParam.content.pageNumber = 1)"></i>
|
|
|
+ </el-input>
|
|
|
+ <el-table :data="distributor.distributorData" @row-click="distributorData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
|
|
|
+ <el-table-column
|
|
|
+ label="客户编号"
|
|
|
+ width="180">
|
|
|
+ <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">
|
|
|
+ <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="handleSizeChangeDistributor"
|
|
|
+ @current-change="handleCurrentChangeDistributor"
|
|
|
+ :page-sizes="[10,20,50,100]"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
+ :current-page="distributor.currentPage"
|
|
|
+ :total="distributor.total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <el-input slot="reference" :readonly="true" v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户" @input="selectCustomer"></el-input>
|
|
|
+ </el-popover>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="电话:" label-width="100px" >
|
|
|
<el-input v-model="form.telephone" autocomplete="off" placeholder="输入电话" disabled></el-input>
|
|
|
@@ -336,6 +444,7 @@ export default {
|
|
|
userInfo:JSON.parse(window.sessionStorage.getItem('userInfo')),
|
|
|
primary:'primary',
|
|
|
text:'',
|
|
|
+ activeName:'客户',
|
|
|
projectParam:{
|
|
|
"id": 20221020143503,
|
|
|
"content": {
|
|
|
@@ -375,6 +484,11 @@ export default {
|
|
|
total:0,
|
|
|
currentPage:0,
|
|
|
},
|
|
|
+ distributor:{
|
|
|
+ distributorData:[],
|
|
|
+ total:0,
|
|
|
+ currentPage:0
|
|
|
+ },
|
|
|
contactsParam:{
|
|
|
"id": "20221022165503",
|
|
|
"content": {
|
|
|
@@ -595,6 +709,19 @@ export default {
|
|
|
this.customerParam.content.where.condition = this.form.enterprisename
|
|
|
this.customerList()
|
|
|
},
|
|
|
+ /*可选经销商*/
|
|
|
+ async distributorList(){
|
|
|
+ this.customerParam.content.where.sa_projectid = 0
|
|
|
+ this.customerParam.content.where.type = 5
|
|
|
+ const res = await this.$api.requested(this.customerParam)
|
|
|
+ this.distributor.distributorData = res.data
|
|
|
+ this.distributor.total = res.total
|
|
|
+ this.distributor.currentPage = res.pageNumber
|
|
|
+ },
|
|
|
+ selectDistributor(){
|
|
|
+ this.customerParam.content.where.condition = this.form.enterprisename
|
|
|
+ this.distributorList()
|
|
|
+ },
|
|
|
/*可选联系人*/
|
|
|
async contactsList(){
|
|
|
this.contactsParam.content.sys_enterpriseid = this.form.sys_enterpriseid
|
|
|
@@ -684,6 +811,22 @@ export default {
|
|
|
this.querySalesman()
|
|
|
}
|
|
|
},
|
|
|
+ /*经销商选择信息*/
|
|
|
+ distributorData(val){
|
|
|
+ this.form.sys_enterpriseid = val.sys_enterpriseid
|
|
|
+ this.form.enterprisename = val.enterprisename
|
|
|
+ this.form.contactsid = 0
|
|
|
+ this.form.contactsname = ''
|
|
|
+ this.form.contactsphonenumber = ''
|
|
|
+ this.form.fax = ''
|
|
|
+ this.form.telephone = ''
|
|
|
+ this.customerShow = false
|
|
|
+ if (!this.isQuotedPrice){
|
|
|
+ this.salerParam.content.type = 1
|
|
|
+ this.salerParam.content.sys_enterpriseid = this.form.sys_enterpriseid
|
|
|
+ this.querySalesman()
|
|
|
+ }
|
|
|
+ },
|
|
|
/*联系人选择信息*/
|
|
|
contactsData(val){
|
|
|
this.form.contactsid = val.contactsid
|
|
|
@@ -704,6 +847,17 @@ export default {
|
|
|
this.projectParam.content.pageNumber = val
|
|
|
this.projectList()
|
|
|
},
|
|
|
+ /*经销商翻页*/
|
|
|
+ handleSizeChangeDistributor(val) {
|
|
|
+ // console.log(`每页 ${val} 条`);
|
|
|
+ this.customerParam.content.pageSize = val
|
|
|
+ this.distributorList()
|
|
|
+ },
|
|
|
+ handleCurrentChangeDistributor(val) {
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
+ this.customerParam.content.pageNumber = val
|
|
|
+ this.distributorList()
|
|
|
+ },
|
|
|
/*客户翻页*/
|
|
|
handleSizeChangeCustomer(val) {
|
|
|
// console.log(`每页 ${val} 条`);
|
|
|
@@ -765,6 +919,14 @@ export default {
|
|
|
/*修改折扣数据*/
|
|
|
discountrateChange(){
|
|
|
this.form.discountrate = Math.round(this.form.discountrate * 100)/100
|
|
|
+ },
|
|
|
+ handleClick(tab){
|
|
|
+ console.log(tab.name,'tab')
|
|
|
+ if (tab.name === '经销商'){
|
|
|
+ this.distributorList()
|
|
|
+ }else {
|
|
|
+ this.customerList()
|
|
|
+ }
|
|
|
}
|
|
|
/* async mainData(val) {
|
|
|
const res = await this.$api.requested({
|