diff --git a/src/components/company/BusinessSelect.vue b/src/components/company/BusinessSelect.vue
index 4190fb3..2673b49 100644
--- a/src/components/company/BusinessSelect.vue
+++ b/src/components/company/BusinessSelect.vue
@@ -35,7 +35,7 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}"
+ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: isMultiple ? 'checkbox' : 'radio'}"
@change="handleTableChange"
class="j-table-force-nowrap">
@@ -71,6 +71,12 @@ export default {
memberNature: {
type: Number,
default: null
+ },
+ // 是否多选-默认false
+ isMultiple: {
+ type:Boolean,
+ required:false,
+ default:false
}
},
data() {
@@ -134,7 +140,6 @@ export default {
if (res.result.total) {
this.ipagination.total = res.result.total
//清空列表选中
- this.onClearSelected()
} else {
this.ipagination.total = 0
}
@@ -158,10 +163,29 @@ export default {
close() {
this.visible = false
this.selectedCompany = {}
+ if (this.isMultiple) {
+ this.selectedCompany = []
+ }
+ this.onClearSelected()
},
onSelectChange(selectedRowKeys, selectionRows) {
- this.selectedCompany = selectionRows[0]
+ console.log('---this.selectedCompany----', selectedRowKeys, selectionRows)
+ if(!this.isMultiple) {
+ this.selectedCompany = selectionRows[0]
+ } else {
+ // selectionRows只会返回当前页数据的返回,所以多选的时候需要比对各个数据是否存在,不存在的话就从当前数据中查询推入selectedCompany中
+ let resultArr = []
+ selectionRows.forEach(row => {
+ let ele = this.selectedCompany.find(ele => ele.id === row.id)
+ if(!ele) {
+ resultArr.push(row)
+ }
+ })
+ this.selectedCompany = [...this.selectedCompany, ...resultArr]
+ // this.selectedCompany = selectionRows
+ }
this.selectedRowKeys = selectedRowKeys
+
},
/*
* 重写一下查询 之前调用的是混入的查询
@@ -175,6 +199,11 @@ export default {
this.queryParam = {}
this.loadData(1)
}
+ },
+ created() {
+ if (this.isMultiple) {
+ this.selectedCompany = []
+ }
}
}
diff --git a/src/components/company/CompanySelect.vue b/src/components/company/CompanySelect.vue
index 0747a71..9ff4d4c 100644
--- a/src/components/company/CompanySelect.vue
+++ b/src/components/company/CompanySelect.vue
@@ -2,14 +2,14 @@
@@ -50,6 +50,12 @@ export default {
type:Boolean,
required:false,
default:false
+ },
+ // 是否多选-默认false
+ isMultiple: {
+ type:Boolean,
+ required:false,
+ default:false
}
},
methods: {
@@ -71,9 +77,22 @@ export default {
* @param value
*/
handleOk(value) {
- let company = {
- id: value.id,
- companyName: value.companyName
+ console.log('--------value---------', 'value')
+ let company = {id: undefined, companyName: undefined}
+ // 多选的时候 全部放在一起,以逗号分隔
+ if (this.isMultiple) {
+ if(value.length > 0) {
+ let ids = [], nameArr = []
+ value.forEach(item => {
+ ids.push(item.id)
+ nameArr.push(item.companyName)
+ })
+ company.id = ids.join()
+ company.companyName= nameArr.join()
+ }
+ } else {
+ company.id = value.id
+ company.companyName= value.companyName
}
this.$emit('change', company)
},
diff --git a/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue b/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue
index 38db2b1..108cd2c 100644
--- a/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue
+++ b/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue
@@ -13,9 +13,13 @@
-
+
{{ item.workingGroupProject }}
@@ -971,7 +975,13 @@ export default {
this.$nextTick(() => {
this.form.setFieldsValue({ payWorkingGroupSubItemContactsList: formData })
})
- }
+ },
+ // 下拉框的搜索
+ filterOption(input, option) {
+ return (
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+ )
+ },
}
}
diff --git a/src/views/statisticalReport/enterprisePaymentStatistics/EnterprisePaymentStatisticsList.vue b/src/views/statisticalReport/enterprisePaymentStatistics/EnterprisePaymentStatisticsList.vue
index 77ce6c1..07c64e9 100644
--- a/src/views/statisticalReport/enterprisePaymentStatistics/EnterprisePaymentStatisticsList.vue
+++ b/src/views/statisticalReport/enterprisePaymentStatistics/EnterprisePaymentStatisticsList.vue
@@ -9,7 +9,7 @@
-