Browse Source

增加报修人员筛选项\文档清单定义加一个批量删除功能

master
han\hanst 1 week ago
parent
commit
7b72b33d9e
  1. 1
      src/api/eam/eamProofing.js
  2. 81
      src/views/modules/eam/com_project_proof_record.vue
  3. 10
      src/views/modules/eam/eamFeedBack.vue

1
src/api/eam/eamProofing.js

@ -13,6 +13,7 @@ export const deleteProofingRecord= data => createAPI(`/plm/proofingInformation/d
export const getProofDocument= data => createAPI(`/plm/proofingInformation/getProofDocument`,'post',data) export const getProofDocument= data => createAPI(`/plm/proofingInformation/getProofDocument`,'post',data)
export const deleteDocumentType= data => createAPI(`/plm/proofingInformation/deleteDocumentType`,'post',data) export const deleteDocumentType= data => createAPI(`/plm/proofingInformation/deleteDocumentType`,'post',data)
export const batchDeleteDocumentType= data => createAPI(`/plm/proofingInformation/batchDeleteDocumentType`,'post',data)
//proofingDocumentSave //proofingDocumentSave
export const proofingDocumentSave = data => createAPI(`/plm/proofingInformation/proofingDocumentSave`,'post',data) export const proofingDocumentSave = data => createAPI(`/plm/proofingInformation/proofingDocumentSave`,'post',data)

81
src/views/modules/eam/com_project_proof_record.vue

@ -211,11 +211,20 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="addDocumentTypeFlag = true">新增</el-button> <el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="addDocumentTypeFlag = true">新增</el-button>
<el-button type="danger" icon="el-icon-delete" style="margin-top: -5px;margin-left: 8px" @click="batchDeleteDocumentTypeHandle">批量删除</el-button>
<el-table <el-table
ref="documentDefinitionTable"
@selection-change="selectionDocumentDefinition"
:height="this.height + 50" :height="this.height + 50"
:data="proofDocumentListDefinition" :data="proofDocumentListDefinition"
border border
style="width: 100%;"> style="width: 100%;">
<el-table-column
header-align="center"
type="selection"
align="center"
width="55">
</el-table-column>
<el-table-column <el-table-column
v-for="(item,index) in columnDocumentManifestDefinitionList" :key="index" v-for="(item,index) in columnDocumentManifestDefinitionList" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"
@ -242,7 +251,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-footer style="height:40px;margin-top: 25px;text-align:center"> <el-footer style="height:40px;margin-top: 25px;text-align:center">
<el-button @click="documentListVisible = false;this.proofDocumentListDefinition = [];">关闭</el-button>
<el-button @click="documentListVisibleFalse">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -645,7 +654,7 @@
import Chooselist from '@/views/modules/common/Chooselist' import Chooselist from '@/views/modules/common/Chooselist'
import { deleteFileInfo, saveFileInfo, updateUploadedFlag } from '@/api/test/fileService.js'; import { deleteFileInfo, saveFileInfo, updateUploadedFlag } from '@/api/test/fileService.js';
import import
{proofingInformationSearch,deleteProofingRecord,proofingDocumentNEW,getExtraDocumentList,editProofingRecord,proofingInformationSave,getProofDocument,deleteDocumentType,proofingDocumentSave,getCopyDocumentFileList} from "@/api/eam/eamProofing.js";
{proofingInformationSearch,deleteProofingRecord,proofingDocumentNEW,getExtraDocumentList,editProofingRecord,proofingInformationSave,getProofDocument,deleteDocumentType,batchDeleteDocumentType,proofingDocumentSave,getCopyDocumentFileList} from "@/api/eam/eamProofing.js";
import row from "element-ui/packages/row"; import row from "element-ui/packages/row";
import UploadFileList1 from "../common/uploadFileList1.vue"; import UploadFileList1 from "../common/uploadFileList1.vue";
import he from "element-ui/src/locale/lang/he"; import he from "element-ui/src/locale/lang/he";
@ -762,6 +771,7 @@
documentTypeId: '' documentTypeId: ''
}, },
documentSelection: [], documentSelection: [],
documentDefinitionSelection: [],
documentCopySelection: [], documentCopySelection: [],
extraDocumentList:[], extraDocumentList:[],
cProjectTypeDbList: [ cProjectTypeDbList: [
@ -1544,6 +1554,12 @@
} else { } else {
this.proofDocumentList = [] this.proofDocumentList = []
} }
this.documentDefinitionSelection = []
this.$nextTick(() => {
if (this.$refs.documentDefinitionTable) {
this.$refs.documentDefinitionTable.clearSelection()
}
})
}) })
}, },
@ -1572,6 +1588,10 @@
documentListVisibleFalse() { documentListVisibleFalse() {
this.documentListVisible = false this.documentListVisible = false
this.proofDocumentListDefinition = [] this.proofDocumentListDefinition = []
this.documentDefinitionSelection = []
if (this.$refs.documentDefinitionTable) {
this.$refs.documentDefinitionTable.clearSelection()
}
}, },
addDocumentList(row) { addDocumentList(row) {
this.proofDocumenCurrentRow = row this.proofDocumenCurrentRow = row
@ -2010,6 +2030,63 @@
}); });
}); });
}, },
selectionDocumentDefinition(val) {
this.documentDefinitionSelection = val
},
batchDeleteDocumentTypeHandle() {
if (this.documentDefinitionSelection.length === 0) {
this.$message({
message: '请选择需要删除的文档清单',
type: 'error'
})
return
}
const hasUploadedDocument = this.documentDefinitionSelection.some(item => item.documentId !== null && item.documentId !== undefined && item.documentId !== '')
if (hasUploadedDocument) {
this.$alert('选中的文档类型存在上传文件,不允许批量删除!', '错误', {
confirmButtonText: '确定'
})
return
}
const documentDefinitionListIds = this.documentDefinitionSelection
.filter(item => item.documentDefinitionListId !== null && item.documentDefinitionListId !== undefined && item.documentDefinitionListId !== '')
.map(item => String(item.documentDefinitionListId))
if (documentDefinitionListIds.length === 0) {
this.$message({
message: '选中的文档清单无有效ID',
type: 'error'
})
return
}
this.$confirm(`是否删除选中的 ${documentDefinitionListIds.length} 条文档清单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const inData = {
site: this.$store.state.user.site,
documentDefinitionListIds: documentDefinitionListIds
}
batchDeleteDocumentType(inData).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '批量删除成功',
type: 'success'
})
this.getProofDocument()
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
addDocumentTypeModal() { addDocumentTypeModal() {
this.addDocumentTypeFlag = true this.addDocumentTypeFlag = true
}, },

10
src/views/modules/eam/eamFeedBack.vue

@ -45,6 +45,9 @@
<el-form-item :label="'部门'"> <el-form-item :label="'部门'">
<el-input v-model="searchData.department" clearable style="width: 120px"></el-input> <el-input v-model="searchData.department" clearable style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'报修人员'">
<el-input v-model="searchData.feedbackBy" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'状态'"> <el-form-item :label="'状态'">
<el-select filterable v-model="searchData.status" clearable style="width: 100px"> <el-select filterable v-model="searchData.status" clearable style="width: 100px">
<el-option label="已录入" value="已录入"></el-option> <el-option label="已录入" value="已录入"></el-option>
@ -78,7 +81,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button v-if="!authSearch" @click="getDataList">查询</el-button>
<el-button v-if="!authSearch" :loading="dataListLoading" @click="getDataList">查询</el-button>
<el-button v-if="!authSave" @click="saveModal">新增</el-button> <el-button v-if="!authSave" @click="saveModal">新增</el-button>
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button> <el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>
<!-- <download-excel--> <!-- <download-excel-->
@ -587,6 +590,7 @@
urgency: '', urgency: '',
repairReportingType: '', repairReportingType: '',
repairType: '', repairType: '',
feedbackBy: '',
matterTrackingFlag: '', matterTrackingFlag: '',
}, },
height: 200, height: 200,
@ -1450,6 +1454,7 @@
// //
getDataList () { getDataList () {
this.dataListLoading = true
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
eamFeedBackSearch(this.searchData).then(({data}) => { eamFeedBackSearch(this.searchData).then(({data}) => {
@ -1459,6 +1464,9 @@
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
} }
}).catch(() => {
this.$message.error('查询异常')
}).finally(() => {
this.dataListLoading = false this.dataListLoading = false
}) })
}, },

Loading…
Cancel
Save