检验报告同步
This commit is contained in:
parent
2b4ee6800c
commit
9ba8739686
|
|
@ -79,3 +79,12 @@ export function getSynchReportCode(data) {
|
||||||
data: data,
|
data: data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设备管理--同步检验报告
|
||||||
|
export function synchReport(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_machine/synchReport',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -349,7 +349,7 @@
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: right">
|
<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>
|
<el-button @click="cancelSynch">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -358,7 +358,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { getKeeperIds} from "@/api/ma/typeConfigKeeper";
|
||||||
import { getRepairIds } from "@/api/ma/typeConfigRepair";
|
import { getRepairIds } from "@/api/ma/typeConfigRepair";
|
||||||
import {
|
import {
|
||||||
|
|
@ -471,6 +471,7 @@
|
||||||
pdf: "", //检验报告pdf
|
pdf: "", //检验报告pdf
|
||||||
pdfName: "", //检验报告pdf名称
|
pdfName: "", //检验报告pdf名称
|
||||||
},
|
},
|
||||||
|
dataSynch: {}, //检验报告同步数据
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -750,6 +751,7 @@
|
||||||
}
|
}
|
||||||
getSynchReportCode(params).then((response) => {
|
getSynchReportCode(params).then((response) => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
|
this.dataSynch = data;
|
||||||
if(data.pdf){
|
if(data.pdf){
|
||||||
this.formSynchParams.pdf = data.pdf;
|
this.formSynchParams.pdf = data.pdf;
|
||||||
this.formSynchParams.pdfName = data.reportName;
|
this.formSynchParams.pdfName = data.reportName;
|
||||||
|
|
@ -786,6 +788,33 @@
|
||||||
pdf: "", //检验报告pdf
|
pdf: "", //检验报告pdf
|
||||||
pdfName: "", //检验报告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() {
|
// handleExport() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue