检验报告同步

This commit is contained in:
hongchao 2025-04-17 14:07:09 +08:00
parent 2b4ee6800c
commit 9ba8739686
2 changed files with 40 additions and 2 deletions

View File

@ -79,3 +79,12 @@ export function getSynchReportCode(data) {
data: data,
})
}
// 设备管理--同步检验报告
export function synchReport(data) {
return request({
url: '/material/ma_machine/synchReport',
method: 'post',
data: data,
})
}

View File

@ -349,7 +349,7 @@
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: right">
<el-button type="primary" @click="downloadCode">同步</el-button>
<el-button type="primary" @click="synchSubmit">同步</el-button>
<el-button @click="cancelSynch">取消</el-button>
</div>
</el-dialog>
@ -358,7 +358,7 @@
</template>
<script>
import { getListDevice,getDeviceDetail,editDevice,addDevice,delDevice,getDeviceType,getZichanType,getSynchReportCode } from "@/api/ma/device";
import { getListDevice,getDeviceDetail,editDevice,addDevice,delDevice,getDeviceType,getZichanType,getSynchReportCode,synchReport } from "@/api/ma/device";
import { getKeeperIds} from "@/api/ma/typeConfigKeeper";
import { getRepairIds } from "@/api/ma/typeConfigRepair";
import {
@ -471,6 +471,7 @@
pdf: "", //pdf
pdfName: "", //pdf
},
dataSynch: {}, //
};
},
created() {
@ -750,6 +751,7 @@
}
getSynchReportCode(params).then((response) => {
let data = response.data;
this.dataSynch = data;
if(data.pdf){
this.formSynchParams.pdf = data.pdf;
this.formSynchParams.pdfName = data.reportName;
@ -786,6 +788,33 @@
pdf: "", //pdf
pdfName: "", //pdf
};
this.dataSynch = {};
},
//
synchSubmit(){
const params = {
checkTimeSynch: this.dataSynch.checkTimeSynch,
nextCheckTimeSynch: this.dataSynch.nextCheckTimeSynch,
pdf: this.dataSynch.pdf,
reportName: this.dataSynch.reportName,
reportNum: this.dataSynch.reportNum,
samples: this.dataSynch.samples,
};
synchReport(params).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess(response.msg);
this.openSynch = false;
this.formSynchParams = {
reportCode: "",
pdf: "",
pdfName: "",
};
this.dataSynch = {};
}
this.getList();
})
}
// handleExport() {