|
@@ -62,52 +62,53 @@
|
|
|
width="900"
|
|
|
v-model="associatedCustomers.show"
|
|
|
trigger="click">
|
|
|
- <el-tabs type="border-card" @tab-click="changeTabCustomers">
|
|
|
-
|
|
|
- <el-input style="width:200px;" placeholder="搜索" :suffix-icon="associatedCustomers.param.content.where.condition?associatedCustomers.param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="associatedCustomers.param.content.where.condition" @keyup.native.enter="associatedCustomersList(associatedCustomers.param.content.pageNumber = 1)" @clear="associatedCustomersList(associatedCustomers.param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
- </el-input>
|
|
|
- <el-table
|
|
|
- border
|
|
|
- height="500px"
|
|
|
- :data="associatedCustomers.listData"
|
|
|
- style="margin-top: 10px"
|
|
|
- @row-click="associatedCustomersSelect"
|
|
|
- :header-cell-style="{background:'#EEEEEE',color:'#333'}"
|
|
|
- size="mini">
|
|
|
- <el-table-column width="80" label="企业编号">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span >{{ scope.row.sys_enterpriseid?scope.row.sys_enterpriseid:'--' }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="190" label="企业名称">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span >{{ scope.row.enterprisename?scope.row.enterprisename:'--' }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="企业地址">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span >{{ scope.row.address?scope.row.address:'--' }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <div style="display:flex;align-items:center;flex-direction:row-reverse;justify-content:space-between">
|
|
|
- <div class="container normal-panel" style="text-align:right">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- @size-change="handleSizeAssociatedCustomers"
|
|
|
- @current-change="handleCurrentAssociatedCustomers"
|
|
|
- :current-page="associatedCustomers.currentPage"
|
|
|
- :page-sizes="[20, 50, 100, 200]"
|
|
|
- :page-size="20"
|
|
|
- layout="total,sizes, prev, pager, next, jumper"
|
|
|
- :total="associatedCustomers.total">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
- <slot name="footerLeft"></slot>
|
|
|
- </div>
|
|
|
-
|
|
|
- </el-tabs>
|
|
|
- <el-input slot="reference" :disabled="form.contactsid !== 0" autosize v-model="form.enterprisename" placeholder="请选择关联企业" @input="changeTabCustomers"></el-input>
|
|
|
+ <el-input style="width:200px;" placeholder="搜索" :suffix-icon="associatedCustomers.param.content.where.condition?associatedCustomers.param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="associatedCustomers.param.content.where.condition" @keyup.native.enter="associatedCustomersList(associatedCustomers.param.content.pageNumber = 1)" @clear="associatedCustomersList(associatedCustomers.param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
+ </el-input>
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ :data="associatedCustomers.listData"
|
|
|
+ height="500px"
|
|
|
+ style="margin-top: 10px"
|
|
|
+ @row-click="associatedCustomersSelect"
|
|
|
+ :header-cell-style="{background:'#EEEEEE',color:'#333'}"
|
|
|
+ size="mini">
|
|
|
+ <el-table-column width="80" label="企业编号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span >{{ scope.row.sys_enterpriseid?scope.row.sys_enterpriseid:'--' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="190" label="企业名称">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span >{{ scope.row.enterprisename?scope.row.enterprisename:'--' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="企业地址">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span >{{ scope.row.address?scope.row.address:'--' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="负责人">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span >{{ scope.row.leader?scope.row.leader:'--' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div style="display:flex;align-items:center;flex-direction:row-reverse;justify-content:space-between">
|
|
|
+ <div class="container normal-panel" style="text-align:right">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ @size-change="handleSizeAssociatedCustomers"
|
|
|
+ @current-change="handleCurrentAssociatedCustomers"
|
|
|
+ :current-page="associatedCustomers.currentPage"
|
|
|
+ :page-sizes="[20, 50, 100, 200]"
|
|
|
+ :page-size="20"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
+ :total="associatedCustomers.total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <slot name="footerLeft"></slot>
|
|
|
+ </div>
|
|
|
+ <el-input readonly slot="reference" autosize v-model="form.enterprisename" placeholder="请选择关联企业" @blur="associatedCustomersList"></el-input>
|
|
|
</el-popover>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -291,15 +292,12 @@ export default {
|
|
|
},
|
|
|
associatedCustomers:{
|
|
|
param:{
|
|
|
- "id": 20220920083901,
|
|
|
+ "id": 20231215134204,
|
|
|
"content": {
|
|
|
"pageNumber": 1,
|
|
|
"pageSize": 20,
|
|
|
"where": {
|
|
|
"condition": "",
|
|
|
- "sa_projectid":'',
|
|
|
- "type":4,
|
|
|
- "typemx":"",
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -350,6 +348,7 @@ export default {
|
|
|
this.myContactList()
|
|
|
this.getTag()
|
|
|
this.form = Object.assign({},this.form,this.data)
|
|
|
+ console.log(this.form,'formData')
|
|
|
this.tags = this.form.tag
|
|
|
if ((this.form.phonenumber.indexOf('-')) != '-1'){
|
|
|
this.form.isTelephone = '1'
|
|
@@ -357,7 +356,6 @@ export default {
|
|
|
this.form.telephone = this.data.phonenumber.substring(this.form.areaCode.length+1)
|
|
|
this.form.phonenumber = ''
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
onSubmit(){
|
|
|
this.$refs['form'].validate(async (valid) => {
|
|
@@ -485,16 +483,15 @@ export default {
|
|
|
this.myContactList()
|
|
|
},
|
|
|
/*关联客户*/
|
|
|
- async associatedCustomersList(){
|
|
|
- this.associatedCustomers.param.content.where.condition = this.form.enterprisename
|
|
|
- this.associatedCustomers.param.content.where.sa_projectid = this.data.sa_projectid
|
|
|
+ async associatedCustomersList(val){
|
|
|
+ this.associatedCustomers.param.content.sys_phonebookid = this.form.sys_phonebookid
|
|
|
const res = await this.$api.requested(this.associatedCustomers.param)
|
|
|
this.associatedCustomers.listData = res.data
|
|
|
this.associatedCustomers.total = res.total
|
|
|
this.associatedCustomers.currentPage = res.pageNumber
|
|
|
},
|
|
|
associatedCustomersSelect(val){
|
|
|
- this.form.sys_enterpriseid = val.sys_enterpriseid
|
|
|
+ this.form.contactsid = val.contactsid
|
|
|
this.form.enterprisename = val.enterprisename
|
|
|
this.associatedCustomers.show = false
|
|
|
},
|
|
@@ -584,6 +581,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ 'associatedCustomers.show':function (val){
|
|
|
+ console.log(val)
|
|
|
+ if (val){
|
|
|
+ this.associatedCustomersList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|