|
|
@@ -201,8 +201,60 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="上级客户:" >
|
|
|
- <el-input v-model="form.superiorenterprisename" placeholder="请选择上级客户" @focus="enterpriseList"></el-input>
|
|
|
+ <el-form-item label="上级企业:" prop="superiorenterprisename">
|
|
|
+ <el-popover
|
|
|
+ placement="bottom"
|
|
|
+ width="700"
|
|
|
+ trigger="click"
|
|
|
+ v-model="customerShow"
|
|
|
+ @show="customerList">
|
|
|
+ <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="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="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="handleSizeChangeCustomer"
|
|
|
+ @current-change="handleCurrentChangeCustomer"
|
|
|
+ :page-sizes="[20,50,100,]"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
+ :current-page="customer.currentPage"
|
|
|
+ :total="customer.total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <el-input slot="reference" :readonly="true" v-model="form.superiorenterprisename" autocomplete="off" placeholder="请选择客户" @input="selectCustomer"></el-input>
|
|
|
+ </el-popover>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
@@ -401,6 +453,24 @@ export default {
|
|
|
total:0,
|
|
|
currentPage:0,
|
|
|
},
|
|
|
+ customerParam:{
|
|
|
+ "id": 20220920083901,
|
|
|
+ "content": {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 20,
|
|
|
+ "where": {
|
|
|
+ "condition": "",
|
|
|
+ "type":2,
|
|
|
+ "sa_projectid":""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ customer:{
|
|
|
+ customerData:[],
|
|
|
+ total:0,
|
|
|
+ currentPage:0,
|
|
|
+ },
|
|
|
+ customerShow:false,
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
|
@@ -707,6 +777,33 @@ export default {
|
|
|
this.agentsParam.content.pageNumber = val
|
|
|
this.queryAgents()
|
|
|
},
|
|
|
+ async customerList(){
|
|
|
+ const res = await this.$api.requested(this.customerParam)
|
|
|
+ this.customer.customerData = res.data
|
|
|
+ this.customer.total = res.total
|
|
|
+ this.customer.currentPage = res.pageNumber
|
|
|
+ },
|
|
|
+ selectCustomer(){
|
|
|
+ this.customerParam.content.where.condition = this.form.enterprisename
|
|
|
+ this.customerList()
|
|
|
+ },
|
|
|
+ /*客户选择信息*/
|
|
|
+ customerData(val){
|
|
|
+ this.form.parentid = val.sa_customersid
|
|
|
+ this.form.superiorenterprisename = val.enterprisename
|
|
|
+ this.customerShow = false
|
|
|
+ },
|
|
|
+ /*客户分页*/
|
|
|
+ handleSizeChangeCustomer(val) {
|
|
|
+ // console.log(`每页 ${val} 条`);
|
|
|
+ this.customerParam.content.pageSize = val
|
|
|
+ this.customerList()
|
|
|
+ },
|
|
|
+ handleCurrentChangeCustomer(val) {
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
+ this.customerParam.content.pageNumber = val
|
|
|
+ this.customerList()
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|