Commit eac1e2ee by zhangxw

bug修改

1 parent dfd6ec10
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
border border
@select="handleChange" @select="handleChange"
@select-all="handleAll"> @select-all="handleAll">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" :selectable="selectable" width="55" align="center" />
<el-table-column label="序号" <el-table-column label="序号"
align="center" align="center"
type="index" type="index"
...@@ -89,6 +89,10 @@ export default { ...@@ -89,6 +89,10 @@ export default {
performanceMerchantSearchForm: { performanceMerchantSearchForm: {
type: Object, type: Object,
default: () => { } default: () => { }
},
copySelectedData: {
type: Object,
default: () => {}
} }
}, },
...@@ -97,6 +101,14 @@ export default { ...@@ -97,6 +101,14 @@ export default {
}, },
methods: { methods: {
selectable(row) {
if (row.merchantId == this.copySelectedData?.merchantId) {
return false
} else {
return true
}
},
getSelectingList() { getSelectingList() {
let params = deepClone(this.performanceMerchantSearchForm) let params = deepClone(this.performanceMerchantSearchForm)
this.performanceMerchantApi({ this.performanceMerchantApi({
...@@ -133,7 +145,7 @@ export default { ...@@ -133,7 +145,7 @@ export default {
var isExit = this.selectedData.findIndex( var isExit = this.selectedData.findIndex(
(subItem) => subItem.merchantId === item.merchantId (subItem) => subItem.merchantId === item.merchantId
) )
if (selection.length && isExit === -1) { if (selection.length && isExit === -1 && item.merchantId != this.copySelectedData?.merchantId) {
this.selectedData.push(item) this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) { } else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1) this.selectedData.splice(isExit, 1)
......
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
:copy-performance-visible="copyPerformanceVisible" :copy-performance-visible="copyPerformanceVisible"
:performance-merchant-api="getListApi" :performance-merchant-api="getListApi"
:performance-merchant-search-form="performanceMerchantSearchForm" :performance-merchant-search-form="performanceMerchantSearchForm"
:copy-selected-data="copySelectedData"
@handleConfirm="handleConfirm" @handleConfirm="handleConfirm"
@handleCancel="handleCancel"> @handleCancel="handleCancel">
<el-row slot> <el-row slot>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!