|
@@ -73,7 +73,11 @@ export default {
|
|
|
const _this = this
|
|
|
// 格式化数字金额单元格
|
|
|
const formatTd = (row, column, rowIndex, uniKey, fun) => {
|
|
|
- return (<div><span onClick={() => fun ? fun(row) : false}>{row[column.field]}</span><span style="font-size:10px;zoom:0.7;margin-left:3px;">{row[uniKey]}</span></div>)
|
|
|
+ if (row[column.field]) {
|
|
|
+ return (<div><span onClick={() => fun ? fun(row) : false}>{row[column.field]}</span><span style="font-size:10px;zoom:0.7;margin-left:3px;">{row[uniKey]}</span></div>)
|
|
|
+ } else {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
}
|
|
|
return {
|
|
|
hasInit: false,
|
|
@@ -94,10 +98,19 @@ export default {
|
|
|
// 行选择改变事件
|
|
|
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
|
|
|
console.log(row, isSelected, selectedRowKeys)
|
|
|
- this.checkboxOption.selectedRowKeys = isSelected ? [selectedRowKeys[selectedRowKeys.length - 1]] : []
|
|
|
+ // 当前勾选产品
|
|
|
+ const endSelProduct = selectedRowKeys[selectedRowKeys.length - 1]
|
|
|
+ console.log('33333:', endSelProduct)
|
|
|
+ if (!(endSelProduct.stackFlag == '1')) {
|
|
|
+ this.checkboxOption.selectedRowKeys = isSelected ? [endSelProduct] : []
|
|
|
+ } else {
|
|
|
+ this.checkboxOption.selectedRowKeys = selectedRowKeys
|
|
|
+ }
|
|
|
// 查询此活动下的产品列表
|
|
|
this.$emit('selected', isSelected ? row : null)
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 禁用的选择(禁止勾选或者禁止取消勾选)
|
|
|
+ disableSelectedRowKeys: this.distabledProductList()
|
|
|
},
|
|
|
// 单元格样式
|
|
|
cellStyleOption: {
|
|
@@ -210,7 +223,7 @@ export default {
|
|
|
title: '正价产品(金额)',
|
|
|
children: [
|
|
|
{
|
|
|
- field: 'regularSelected',
|
|
|
+ field: 'regularQuota',
|
|
|
key: 'f',
|
|
|
title: '配额',
|
|
|
width: 50,
|
|
@@ -425,6 +438,13 @@ export default {
|
|
|
openGuideModal: false // 导入产品引导
|
|
|
}
|
|
|
},
|
|
|
+ // 禁用未启用产品
|
|
|
+ computed: {
|
|
|
+ distabledProductList () {
|
|
|
+ const disabledArr = this.tableData.map(item => item.id)
|
|
|
+ return disabledArr
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
async getDataList () {
|
|
|
this.hasInit = true
|
|
@@ -440,6 +460,7 @@ export default {
|
|
|
// 正价统计
|
|
|
const isYuan1 = item.regularRuleUnit == 'YUAN'
|
|
|
const regularUnit = isYuan1 ? '元' : '个' // 单位
|
|
|
+ const regularQuota = item.gateQuotaAmount // 配额
|
|
|
const regularSelected = isYuan1 ? item.regularTotalAmount : item.regularTotalQty // 已选
|
|
|
const regularTotal = isYuan1 ? item.regularBorrowAmount : item.regularBorrowQty // 累计
|
|
|
const regularBalance = 0 // 差额 = 额度 - 已选 - 累计
|