| | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['system:report:add']">少量报备</el-button> |
| | | v-hasPermi="['system:report:add']">单次报备</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="success" plain icon="el-icon-upload" size="mini" @click="handleImport">批量报备</el-button> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div style="flex: 6; border-right: 1px solid #d2d1d1; padding-right: 20px"> |
| | | <div>批量审核同一批次号的报备</div> |
| | | <div> |
| | | <el-checkbox-group v-model="selectedTo"> |
| | | <el-checkbox v-for="item in togetherList" :label="item.id">{{item.pointName}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> |
| | | <div style="flex: 5; padding-left: 20px"> |
| | | <el-form> |
| | | <el-form-item label="报备内容"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listReport, getReport, delReport, addReport, updateReport, auditing, audit, importReport } from "@/api/platform/report"; |
| | | import { listReport, getReport, delReport, addReport, updateReport, auditing, audit, importReport, getTogether } from "@/api/platform/report"; |
| | | import { pointSelectData } from "@/api/platform/point"; |
| | | |
| | | export default { |
| | |
| | | name: "Report", |
| | | data() { |
| | | return { |
| | | // 选中的同一批次号报备 |
| | | selectedTo: [], |
| | | // 同一批次号的报备 |
| | | togetherList: [], |
| | | fileList: [], |
| | | url: process.env.VUE_APP_BASE_API + '/report/import', |
| | | addOrImport: 'add', |
| | |
| | | }) |
| | | }, |
| | | handleAuditing(row) { |
| | | if (row.importBatchNumber) { |
| | | getTogether(row.importBatchNumber).then(res => { |
| | | this.togetherList = res.data; |
| | | if (this.togetherList && this.togetherList.length > 0) { |
| | | this.togetherList = this.togetherList.filter(item => item.id != row.id) |
| | | this.selectedTo = this.togetherList.map(item => item.pointId) |
| | | } |
| | | }) |
| | | } |
| | | this.auditingOpen = true; |
| | | this.auditingForm.id = row.id |
| | | this.auditingForm.pointId = row.pointId |
| | |
| | | this.auditingForm.auditingTime = new Date(); |
| | | let data = { |
| | | id: this.auditingForm.id, |
| | | togetherList: this.selectedTo |
| | | auditOpinion: this.auditingForm.auditOpinion, |
| | | auditingResult: this.auditingForm.auditingResult |
| | | } |
| | |
| | | formData.append("importPointId", this.fileList[0]); |
| | | formData.append("pointId", this.form.importPointId); |
| | | formData.append("reportType", this.form.reportType); |
| | | formData.append("errorType", this.form.errorTypeList); |
| | | formData.append("errorTypeList", this.form.errorTypeList); |
| | | formData.append("reportContent", this.form.reportContent); |
| | | formData.append("reportMaterials", this.form.reportMaterials); |
| | | formData.append("expirTime", this.form.expirTime); |
| | | formData.append("beginCreateTimeStr", this.form.daterangeCreateTime[0]); |
| | | formData.append("endCreateTimeStr", this.form.daterangeCreateTime[1]); |
| | | importReport(formData).then(() => { |
| | | this.$modal.msgSuccess("成功提交报备"); |
| | | this.open = false; |