small updates getting running
This commit is contained in:
parent
e0489f5ca8
commit
5001030746
@ -2,27 +2,27 @@
|
||||
<div class="card-header">Calibration Devices</div>
|
||||
<div class="card-body">
|
||||
<h3>Primary Device</h3>
|
||||
<select name="primary_device" v-model="report_type" required id="id_report_type">
|
||||
<select name="primary_device" v-model="primary_device" required id="id_report_type">
|
||||
<option value="-" selected>----Primary-----</option>
|
||||
<option value="TV">Menzer1</option>
|
||||
<option value="HC">Blackbelt</option>
|
||||
<option value="Menzer1">Menzer1</option>
|
||||
<option value="Blackbelt">Blackbelt</option>
|
||||
</select>
|
||||
<h3>Calibration Date</h3>
|
||||
<div class="date-picker">
|
||||
<VueDatePicker v-model="date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
||||
<VueDatePicker v-model="primary_calibration_date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
||||
</div>
|
||||
<hr />
|
||||
<h3>Secondary Device</h3>
|
||||
|
||||
<select name="secondary_device" v-model="report_type" required id="id_report_type">
|
||||
<select name="secondary_device" v-model="secondary_device" required id="id_report_type">
|
||||
<option value="-" selected>----Secondary-----</option>
|
||||
<option value="TV">Menzer1</option>
|
||||
<option value="HC">Blackbelt</option>
|
||||
<option value="Menzer1">Menzer1</option>
|
||||
<option value="Blackbelt">Blackbelt</option>
|
||||
</select>
|
||||
|
||||
<h3>Calibration Date</h3>
|
||||
<div class="date-picker">
|
||||
<VueDatePicker v-model="date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
||||
<VueDatePicker v-model="secondary_calibration_date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -32,22 +32,20 @@ import { ref, defineEmits, watchEffect } from "vue";
|
||||
import VueDatePicker from "@vuepic/vue-datepicker";
|
||||
import "@vuepic/vue-datepicker/dist/main.css";
|
||||
|
||||
const model = ref(""),
|
||||
serial = ref(""),
|
||||
cert_id = ref(""),
|
||||
due_date = ref(new Date()),
|
||||
date = ref(new Date());
|
||||
const primary_device = ref(""),
|
||||
secondary_device = ref(""),
|
||||
primary_calibration_date = ref(new Date()),
|
||||
secondary_calibration_date = ref(new Date());
|
||||
|
||||
const flow = ref(["year", "month", "calendar"]);
|
||||
|
||||
const emit = defineEmits();
|
||||
watchEffect(() => {
|
||||
emit("new-calibration-form", {
|
||||
model,
|
||||
serial,
|
||||
cert_id,
|
||||
due_date,
|
||||
date,
|
||||
primary_device,
|
||||
secondary_device,
|
||||
primary_calibration_date,
|
||||
secondary_calibration_date,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -7,12 +7,12 @@
|
||||
<br>
|
||||
<br>
|
||||
<div :class="{ hide: hide }" class="px666 scroll-pdf">
|
||||
<div v-for="table of tables">
|
||||
<div id="pdf" ref="document">
|
||||
<div v-for="table of tables">
|
||||
<div class="header">
|
||||
<div class="flex-container">
|
||||
<div class="column pct-25">
|
||||
<img :src="BenchTopLogoUrl"/>
|
||||
<img :src="BenchTopLogoUrl" alt="benchtop devices logo" />
|
||||
</div>
|
||||
<div class="column pct-50">
|
||||
<div>Customer: {{ props.customer?.customer_name }}</div>
|
||||
@ -193,7 +193,10 @@ const c_due_date = () => {
|
||||
};
|
||||
|
||||
const exportToPDF = () => {
|
||||
if (props.upload !== undefined && props.upload.files.length > 0) {
|
||||
const element = document.getElementById("pdf");
|
||||
|
||||
|
||||
var opt = {
|
||||
margin: 0.4,
|
||||
filename: `${props.instrument.model}_${i_date()}.pdf`,
|
||||
@ -202,6 +205,7 @@ const exportToPDF = () => {
|
||||
jsPDF: {unit: "in", format: "letter", orientation: "portrait"},
|
||||
};
|
||||
html2pdf().from(element).set(opt).save();
|
||||
}
|
||||
};
|
||||
|
||||
const output = () => {
|
||||
|
@ -110,7 +110,7 @@ const showNewCalibration = (val) => {
|
||||
show_new_calibration.value = val;
|
||||
};
|
||||
|
||||
const emits = defineEmits([
|
||||
const emit = defineEmits([
|
||||
"uploadForm",
|
||||
"customerForm",
|
||||
"environmentForm",
|
||||
|
4961
benchtop-fe/yarn.lock
Normal file
4961
benchtop-fe/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user