updated
This commit is contained in:
parent
f68c4af30b
commit
935c85aba0
2 changed files with 67 additions and 30 deletions
|
|
@ -73,7 +73,17 @@ watch(
|
|||
<q-card-section class="q-pt-none">
|
||||
<div class="row items-center q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<q-label>เนื้อหาคำสั่งส่วนต้น</q-label>
|
||||
<q-input
|
||||
type="textarea"
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="textHeader"
|
||||
label="เนื้อหาคำสั่งส่วนต้น"
|
||||
/>
|
||||
<!-- <q-label>เนื้อหาคำสั่งส่วนต้น</q-label>
|
||||
<q-field
|
||||
class="q_field_p_none"
|
||||
ref="fieldRef"
|
||||
|
|
@ -90,11 +100,22 @@ watch(
|
|||
@input="(e:any) => handleInput(e, 'textHeader')"
|
||||
/>
|
||||
</template>
|
||||
</q-field>
|
||||
</q-field> -->
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-label>เนื้อหาคำสั่งส่วนกลาง</q-label>
|
||||
<q-input
|
||||
type="textarea"
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="textBody"
|
||||
label="เนื้อหาคำสั่งส่วนกลาง"
|
||||
/>
|
||||
|
||||
<!-- <q-label>เนื้อหาคำสั่งส่วนกลาง</q-label>
|
||||
<q-field
|
||||
class="q_field_p_none"
|
||||
ref="fieldRef"
|
||||
|
|
@ -111,11 +132,21 @@ watch(
|
|||
@input="(e:any) => handleInput(e, 'textBody')"
|
||||
/>
|
||||
</template>
|
||||
</q-field>
|
||||
</q-field> -->
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-label>เนื้อหาคำสั่งส่วนท้าย</q-label>
|
||||
<q-input
|
||||
type="textarea"
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="textFooter"
|
||||
label="เนื้อหาคำสั่งส่วนท้าย"
|
||||
/>
|
||||
<!-- <q-label>เนื้อหาคำสั่งส่วนท้าย</q-label>
|
||||
<q-field
|
||||
class="q_field_p_none"
|
||||
ref="fieldRef"
|
||||
|
|
@ -132,7 +163,7 @@ watch(
|
|||
@input="(e:any) => handleInput(e, 'textFooter')"
|
||||
/>
|
||||
</template>
|
||||
</q-field>
|
||||
</q-field> -->
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import config from "@/app.config";
|
||||
import axios from "axios";
|
||||
|
||||
// import genReport from "@/plugins/genreport";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -26,7 +26,28 @@ const type = defineModel<string>("type", { required: true }); // แยก tab
|
|||
const documentFile = ref<File | null>(null); // file
|
||||
|
||||
/** download file */
|
||||
function downloadFile() {}
|
||||
async function downloadFile() {
|
||||
showLoader();
|
||||
const data = await {
|
||||
template: "command_test",
|
||||
reportName: "docx-report",
|
||||
data: {
|
||||
title: "สำนักงานเขตพระนคร",
|
||||
commandNo: "๑๒",
|
||||
commandYear: "๒๕๖๗",
|
||||
commandTitle: "ย้ายข้าราชการ",
|
||||
detailHeader: "",
|
||||
detailBody:
|
||||
"อาศัยอำนาจตามความในมาตรา ๔๔ และมาตรา ๕๒ (๔) แห่งพระราชบัญญัติระเบียบข้าราชการ-กรุงเทพมหานครและบุคลากรกรุงเทพมหานคร พ.ศ. ๒๕๕๔ ประกอบกับมาตรา ๖๒ และมาตรา ๖๓ แห่งพระราชบัญญัติระเบียบข้าราชการพลเรือน พ.ศ. ๒๕๕๑ มาตรา ๑๔ แห่งพระราชกฤษฎีกาการจ่าย-เงินเดือน เงินปี บำเหน็จ บำนาญ และเงินอื่นในลักษณะเดียวกัน พ.ศ. ๒๕๓๕ มติ ก.ก. ครั้งที่ ๕/๒๕๕๔",
|
||||
detailFooter:
|
||||
"เมื่อวันที่ ๒๑ กรกฎาคม ๒๕๕๔ และมติ ก.ก. ครั้งที่ ๖/๒๕๕๔ เมื่อวันที่ ๑๘ สิงหาคม ๒๕๕๔ ให้ย้ายข้าราชการ จำนวน ๑ ราย ดังบัญชีรายละเอียดแนบท้ายนี้",
|
||||
commandDate: "๑ สิงหาคม ๒๕๖๗",
|
||||
name: "นายสมชาย ใจดี",
|
||||
position: "ผู้อำนวยการเขตพระนคร",
|
||||
},
|
||||
};
|
||||
await genReport(data, `คำสั่ง`);
|
||||
}
|
||||
|
||||
/** uplaod file */
|
||||
function clickUpload(file: File | null) {
|
||||
|
|
@ -56,40 +77,25 @@ function replaceAllTag(html: string) {
|
|||
|
||||
async function fetchDocumentTemplate() {
|
||||
showLoader();
|
||||
let textEditHeader = "";
|
||||
let textEditBody = "";
|
||||
let textEditFooter = "";
|
||||
textEditHeader +=
|
||||
"อาศัยอำนาจตามความในมาตรา ๔๔ และมาตรา ๕๒ (๔) แห่งพระราชบัญญัติระเบียบข้าราชการ-กรุงเทพมหานครและบุคลากรกรุงเทพมหานคร พ.ศ. ๒๕๕๔ ประกอบกับกฎ ก.ก. ว่าด้วยการทดลองปฏิบัติ-หน้าที่ราชการและการพัฒนาข้าราชการกรุงเทพมหานครสามัญที่อยู่ระหว่างทดลองปฏิบัติหน้าที่ราชการ พ.ศ. ๒๕๕๕ มติคณะกรรมการข้าราชการกรุงเทพมหานครและบุคลากรกรุงเทพมหานคร ครั้งที่ ๑/๒๕๕๔ เมื่อวันที่ ๒๒ ธันวาคม ๒๕๕๔ มติ อ.ก.ก. วิสามัญเกี่ยวกับระบบราชการ การจัดส่วนราชการ และค่าตอบแทน ครั้งที่ ๙/๒๕๕๖";
|
||||
|
||||
textEditBody +=
|
||||
"เมื่อวันที่ ๑๘ กันยายน ๒๕๕๖ ประกาศผลการสอบแข่งขันสำนักงานคณะกรรมการ-ข้าราชการกรุงเทพมหานคร ครั้งที่ ๑/๒๕๖๔ ลงวันที่ ๒๙ เมษายน ๒๕๖๕ ตำแหน่งนักทรัพยากรบุคคลปฏิบัติการ จึงบรรจุและแต่งตั้งผู้สอบแข่งขันได้เข้ารับราชการเป็นข้าราชการกรุงเทพมหานครสามัญ และแต่งตั้งให้ดำรงตำแหน่งนักทรัพยากรบุคคลปฏิบัติการ จำนวน ๔ ราย";
|
||||
|
||||
textEditFooter += "ดังบัญชีรายละเอียดแนบท้ายคำสั่งนี้";
|
||||
const data = await {
|
||||
template: "command_test",
|
||||
reportName: "docx-report",
|
||||
data: {
|
||||
title: "สำนักงานเขตพระนคร",
|
||||
commandNo: "๑๒",
|
||||
commandYear: "๒๕๖๗",
|
||||
commandTitle: "บรรจุและแต่งตั้งผู้สอบแข่งขันได้",
|
||||
detailHeader: textEditHeader,
|
||||
commandTitle: "ย้ายข้าราชการ",
|
||||
detailHeader: "",
|
||||
detailBody:
|
||||
'<meta charset="UTF-8"><body><p style="font-family: \'TH Sarabun Psk\'; font-size: 16pt;">' +
|
||||
replaceAllTag(textEditBody) +
|
||||
"</p></body>",
|
||||
"อาศัยอำนาจตามความในมาตรา ๔๔ และมาตรา ๕๒ (๔) แห่งพระราชบัญญัติระเบียบข้าราชการ-กรุงเทพมหานครและบุคลากรกรุงเทพมหานคร พ.ศ. ๒๕๕๔ ประกอบกับมาตรา ๖๒ และมาตรา ๖๓ แห่งพระราชบัญญัติระเบียบข้าราชการพลเรือน พ.ศ. ๒๕๕๑ มาตรา ๑๔ แห่งพระราชกฤษฎีกาการจ่าย-เงินเดือน เงินปี บำเหน็จ บำนาญ และเงินอื่นในลักษณะเดียวกัน พ.ศ. ๒๕๓๕ มติ ก.ก. ครั้งที่ ๕/๒๕๕๔",
|
||||
detailFooter:
|
||||
'<meta charset="UTF-8"><body><p style="font-family: \'TH Sarabun Psk\'; font-size: 16pt;">' +
|
||||
replaceAllTag(textEditFooter) +
|
||||
"</p></body>",
|
||||
"เมื่อวันที่ ๒๑ กรกฎาคม ๒๕๕๔ และมติ ก.ก. ครั้งที่ ๖/๒๕๕๔ เมื่อวันที่ ๑๘ สิงหาคม ๒๕๕๔ ให้ย้ายข้าราชการ จำนวน ๑ ราย ดังบัญชีรายละเอียดแนบท้ายนี้",
|
||||
commandDate: "๑ สิงหาคม ๒๕๖๗",
|
||||
name: "Admin Administrator",
|
||||
position: "Admin Administrator",
|
||||
name: "นายสมชาย ใจดี",
|
||||
position: "ผู้อำนวยการเขตพระนคร",
|
||||
},
|
||||
};
|
||||
|
||||
// genReport(data, `คำสั่ง`);
|
||||
|
||||
await axios
|
||||
.post(config.API.reportTemplate + `/docx/html`, data, {
|
||||
headers: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue