|
|
@@ -82,6 +82,63 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="上级客户:" >
|
|
|
+ <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="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-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">
|
|
|
<el-form-item label="省市县:" prop="province">
|
|
|
<el-cascader
|
|
|
@@ -108,18 +165,15 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="所属行业:" prop="industry">
|
|
|
- <el-input v-model="form.industry" placeholder="所属行业"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="联系人:" prop="contact">
|
|
|
- <el-input v-model="form.contact" placeholder="联系人"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="联系电话:" prop="phonenumber">
|
|
|
- <el-input v-model="form.phonenumber" placeholder="联系电话"></el-input>
|
|
|
+ <el-form-item label="所属行业:" >
|
|
|
+ <el-select v-model="form.industry" placeholder="请选择所属行业" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options.industryData"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
@@ -158,6 +212,7 @@ export default {
|
|
|
isordercheck:true,
|
|
|
isusedcheck:false,
|
|
|
checkResults:'',
|
|
|
+ customerShow:false,
|
|
|
businessData:[],
|
|
|
businessParam:{
|
|
|
"id": 20221208103601,
|
|
|
@@ -171,6 +226,9 @@ export default {
|
|
|
total:0,
|
|
|
currentPage:0,
|
|
|
value:'',
|
|
|
+ options:{
|
|
|
+ industryData:[]
|
|
|
+ },
|
|
|
form:{
|
|
|
"value":[],
|
|
|
"sa_customersid": 0,//新增是传0
|
|
|
@@ -202,7 +260,24 @@ export default {
|
|
|
source:[
|
|
|
{ required: true, message: '请填写客户来源', trigger: 'blur'}
|
|
|
],
|
|
|
- }
|
|
|
+ },
|
|
|
+ customerParam:{
|
|
|
+ "id": 20220920083901,
|
|
|
+ "content": {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 10,
|
|
|
+ "where": {
|
|
|
+ "condition": "",
|
|
|
+ "type":2,
|
|
|
+ "sa_projectid":""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ customer:{
|
|
|
+ customerData:[],
|
|
|
+ total:0,
|
|
|
+ currentPage:0,
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
props:['data','btnType'],
|
|
|
@@ -354,6 +429,52 @@ export default {
|
|
|
this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
|
|
|
|
|
|
},
|
|
|
+ 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()
|
|
|
+ },
|
|
|
+ /*行业列表*/
|
|
|
+ async industryList(){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "sysmanage.develop.optiontype.optiontype",
|
|
|
+ "method": "optiontypeselect",
|
|
|
+ "content": {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 20,
|
|
|
+ "typename": "industry",
|
|
|
+ "parameter": {
|
|
|
+ "siteid": "YOSTEST2"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.options.industryData = res.data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.industryList()
|
|
|
}
|
|
|
}
|
|
|
</script>
|