|
@@ -30,7 +30,7 @@ import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import ImageUpload from '@/components/file-upload'
|
|
import ImageUpload from '@/components/file-upload'
|
|
import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
-import { listPageV2, pageExport, pool } from "@/api/workOrder/settleAccountsOrder";
|
|
|
|
|
|
+import { listPageV2, pageExport, pool, poolMore } from "@/api/workOrder/settleAccountsOrder";
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
export default {
|
|
export default {
|
|
components: { TemplatePage, ImageUpload },
|
|
components: { TemplatePage, ImageUpload },
|
|
@@ -40,7 +40,8 @@ export default {
|
|
// 表格属性
|
|
// 表格属性
|
|
tableAttributes: {
|
|
tableAttributes: {
|
|
// 启用勾选列
|
|
// 启用勾选列
|
|
- selectColumn: false
|
|
|
|
|
|
+ selectColumn: true,
|
|
|
|
+ selectable: this.selectable
|
|
},
|
|
},
|
|
// 表格事件
|
|
// 表格事件
|
|
tableEvents: {
|
|
tableEvents: {
|
|
@@ -69,8 +70,15 @@ export default {
|
|
return [
|
|
return [
|
|
[
|
|
[
|
|
[
|
|
[
|
|
- this.optionsEvensAuth("collect", {
|
|
|
|
- click: this.poolData
|
|
|
|
|
|
+ this.optionsEvensAuth("collectMonth", {
|
|
|
|
+ click: this.poolData1
|
|
|
|
+ })
|
|
|
|
+ ]
|
|
|
|
+ ],
|
|
|
|
+ [
|
|
|
|
+ [
|
|
|
|
+ this.optionsEvensAuth("collectMore", {
|
|
|
|
+ click: this.poolData2
|
|
})
|
|
})
|
|
]
|
|
]
|
|
]
|
|
]
|
|
@@ -153,6 +161,9 @@ export default {
|
|
columnParsing(item, defaultData) {
|
|
columnParsing(item, defaultData) {
|
|
return defaultData
|
|
return defaultData
|
|
},
|
|
},
|
|
|
|
+ selectable(row, index) {
|
|
|
|
+ return ["NO"].includes(Object.entries(row.selectMapData.poolStatus).find(([key, val]) => val == row.poolStatus)?.[0])
|
|
|
|
+ },
|
|
// 监听勾选变化
|
|
// 监听勾选变化
|
|
selectionChange(data) {
|
|
selectionChange(data) {
|
|
this.recordSelected = data
|
|
this.recordSelected = data
|
|
@@ -183,10 +194,16 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- poolData() {
|
|
|
|
|
|
+ poolData1() {
|
|
this.formDialogType = 0
|
|
this.formDialogType = 0
|
|
this.openForm()
|
|
this.openForm()
|
|
},
|
|
},
|
|
|
|
+ poolData2() {
|
|
|
|
+ if (this.recordSelected.length == 0) {
|
|
|
|
+ return this.$message.warning('请至少勾选一条数据!');
|
|
|
|
+ }
|
|
|
|
+ this.poolMore(this.recordSelected.map(item => { return item.id }))
|
|
|
|
+ },
|
|
openForm() {
|
|
openForm() {
|
|
this.formDialog = true;
|
|
this.formDialog = true;
|
|
},
|
|
},
|
|
@@ -195,6 +212,20 @@ export default {
|
|
this.$data.formData = this.$options.data().formData
|
|
this.$data.formData = this.$options.data().formData
|
|
this.formDialog = false
|
|
this.formDialog = false
|
|
},
|
|
},
|
|
|
|
+ poolMore(ids){
|
|
|
|
+ this.$confirm('请确认是否批量汇总选中的数据, 是否继续?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ poolMore({
|
|
|
|
+ ids
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
|
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ },
|
|
formConfirm() {
|
|
formConfirm() {
|
|
this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
|
|
this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
|
|
if (valid) {
|
|
if (valid) {
|