|
@@ -159,7 +159,8 @@ export default {
|
|
|
// 表格属性
|
|
|
tableAttributes: {
|
|
|
// 启用勾选列
|
|
|
- selectColumn: true
|
|
|
+ selectColumn: true,
|
|
|
+ selectable: this.selectable
|
|
|
},
|
|
|
// 表格事件
|
|
|
tableEvents: {
|
|
@@ -200,7 +201,18 @@ export default {
|
|
|
computed: {
|
|
|
// 事件组合
|
|
|
optionsEvensGroup() {
|
|
|
- return []
|
|
|
+ return [
|
|
|
+ [
|
|
|
+ [
|
|
|
+ this.optionsEvensAuth("bulkSettlement", {
|
|
|
+ isRole: this.tabIndex == 2,
|
|
|
+ click: () => {
|
|
|
+ this.batchSettleAccounts()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ],
|
|
|
+ ]
|
|
|
+ ]
|
|
|
},
|
|
|
// 更多参数
|
|
|
moreParameters() {
|
|
@@ -236,6 +248,12 @@ export default {
|
|
|
columnParsing(item, defaultData) {
|
|
|
return defaultData
|
|
|
},
|
|
|
+ selectable(row, index) {
|
|
|
+ if(this.tabIndex==2){
|
|
|
+ console.log(row,row.selectMapData)
|
|
|
+ return ["WAIT"].includes(Object.entries(row.selectMapData.status).find(([key, val]) => val == row.status)?.[0])
|
|
|
+ }
|
|
|
+ },
|
|
|
// 监听勾选变化
|
|
|
selectionChange(data) {
|
|
|
this.recordSelected = data
|
|
@@ -302,7 +320,7 @@ export default {
|
|
|
btnType: 'text',
|
|
|
conditions: ({ row, index, column }) => {
|
|
|
if(this.tabIndex == 1){
|
|
|
- return row.status == 'WAIT' && row.workerAmount != row.okAmount
|
|
|
+ return row.workerAmount != row.okAmount
|
|
|
}else{
|
|
|
return row.status == 'WAIT'
|
|
|
}
|
|
@@ -321,6 +339,12 @@ export default {
|
|
|
},
|
|
|
})
|
|
|
},
|
|
|
+ batchSettleAccounts() {
|
|
|
+ if (this.recordSelected.length == 0) {
|
|
|
+ return this.$message.warning('请至少勾选一条数据!');
|
|
|
+ }
|
|
|
+ this.settleAccounts(this.recordSelected.map(item => { return item.settlementOrderId }).join(','))
|
|
|
+ },
|
|
|
settleAccounts(id,cancel,type) {
|
|
|
this.$confirm(`请确认是否提交结算, 是否继续?`, '提示', {
|
|
|
confirmButtonText: '确定',
|