progress in repservice print ticket
This commit is contained in:
parent
78e184748c
commit
98785231a7
|
@ -1,196 +1,298 @@
|
||||||
|
{% block content %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fa" direction="rtl"></html>
|
<html lang="fa" direction="rtl">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<style>
|
<style>
|
||||||
.center {
|
@page {
|
||||||
|
margin: 5mm;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-family: 'B Nazanin', Arial, sans-serif;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
direction: rtl;
|
||||||
|
width: 100%;
|
||||||
|
padding: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
.header table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
.header td {
|
||||||
|
padding: 4px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.header img {
|
||||||
|
max-width: 35px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.header h3 {
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.header h4 {
|
||||||
|
font-size: 12px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.section {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
.section-header {
|
||||||
|
background-color: #666;
|
||||||
|
color: white;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 4px 4px 0 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.text-white {
|
.section table {
|
||||||
color: white;
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
.stimol td,
|
.section td {
|
||||||
.stimol th {
|
padding: 4px;
|
||||||
border: 1px solid black;
|
line-height: 1.8;
|
||||||
}
|
}
|
||||||
.item {
|
.section p {
|
||||||
height: 40px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.det tr {
|
.bottom-container {
|
||||||
height: 40px;
|
width: 100%;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
.notes {
|
||||||
|
width: 58%;
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-radius: 4px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.notes table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
.notes td {
|
||||||
|
padding: 4px;
|
||||||
|
line-height: 1.8;
|
||||||
|
}
|
||||||
|
.notes p {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.notes-content {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.notes-content * {
|
||||||
|
unicode-bidi: embed;
|
||||||
|
}
|
||||||
|
.notes-content .ltr {
|
||||||
|
direction: ltr !important;
|
||||||
|
text-align: left !important;
|
||||||
|
unicode-bidi: embed !important;
|
||||||
|
}
|
||||||
|
.notes-content .rtl {
|
||||||
|
direction: rtl !important;
|
||||||
|
text-align: right !important;
|
||||||
|
unicode-bidi: embed !important;
|
||||||
|
}
|
||||||
|
.signature {
|
||||||
|
width: 40%;
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-radius: 4px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.signature table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
.signature td {
|
||||||
|
padding: 4px;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 1.8;
|
||||||
|
}
|
||||||
|
.signature-text {
|
||||||
|
text-align: right;
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
.signature-seal {
|
||||||
|
text-align: center;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
.signature img {
|
||||||
|
max-width: 120px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.clearfix::after {
|
||||||
|
content: "";
|
||||||
|
clear: both;
|
||||||
|
display: table;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="direction:rtl; width:100%">
|
<body>
|
||||||
<div class="block-content pt-1 pb-3 d-none d-sm-block">
|
<div class="container">
|
||||||
<div class="c-print container-xl">
|
<div class="header">
|
||||||
<div class="tg-wrap" style="width:100%; border:1px solid black;border-radius: 8px;">
|
<table>
|
||||||
<table class="rounded" style="width:100%;">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:20%">
|
<td style="width:20%">
|
||||||
<img src="{{ url('front_avatar_file_get', {id: bid.id},)}}" width="65"/>
|
<img src="{{ url('front_avatar_file_get', {id: bid.id}) }}" alt="لوگو" style="max-width: 35px; height: auto;"/>
|
||||||
</td>
|
</td>
|
||||||
<td style="width:60%; text-align:center">
|
<td style="width:60%; text-align:center">
|
||||||
<h3 class="">{{ bid.name }}</h3>
|
<h3>{{ bid.name }}</h3>
|
||||||
<br/>
|
<h4>رسید تحویل کالا</h4>
|
||||||
<h4 class="">رسید تحویل کالا</h4>
|
<h4>{{bid.name}}</h4>
|
||||||
</td>
|
</td>
|
||||||
<td style="width:20%">
|
<td style="width:20%">
|
||||||
<h4>
|
<h4>
|
||||||
<b>تاریخ:</b>
|
<b>تاریخ:</b>
|
||||||
{{ doc.date }}</h4>
|
{{ doc.date }}</h4>
|
||||||
<br/>
|
|
||||||
<h4>
|
<h4>
|
||||||
<b>شماره:</b>
|
<b>شماره:</b>
|
||||||
{{ doc.code }}</h4>
|
{{ doc.code }}</h4>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<b>اطلاعات {{bid.type}}</b>
|
||||||
|
</div>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="width:50%">
|
||||||
|
<p><b>نام فروشگاه:</b> {{ bid.legalName }}</p>
|
||||||
|
<p><b>آدرس:</b> استان {{ bid.ostan }}، شهر {{ bid.shahrestan }}، {{ bid.address }}</p>
|
||||||
|
</td>
|
||||||
|
<td style="width:50%">
|
||||||
|
<p><b>تلفن تماس:</b> {{ bid.tel }}</p>
|
||||||
|
<p><b>کد اقتصادی:</b> {{ bid.codeeghtesadi }}</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<b>مشتری</b>
|
||||||
|
</div>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
<b>نام:</b>
|
||||||
|
{{ doc.person.nikename }}</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
<b>تلفن همراه:</b>
|
||||||
|
{{ doc.person.mobile }}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:100%" colspan="3">
|
<td colspan="2">
|
||||||
<p>
|
<p>
|
||||||
<b>آدرس:
|
<b>آدرس:</b>
|
||||||
</b>
|
{{ doc.person.address }}</p>
|
||||||
استان
|
|
||||||
{{ bid.ostan }}، شهر
|
|
||||||
{{ bid.shahrestan }}،
|
|
||||||
{{ bid.address }}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<b>تلفن تماس:</b>{{ bid.tel }}
|
|
||||||
</p>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:100%; border:1px solid black;border-radius: 8px;margin-top:5px;text-align:center;">
|
|
||||||
<div class="tg-wrap" style="width:100%;border-radius: 8px 8px 0px 0px;text-align:center;background-color:gray">
|
<div class="section">
|
||||||
<b style="color:white;">مشتری</b>
|
<div class="section-header">
|
||||||
|
<b>اطلاعات کالا</b>
|
||||||
</div>
|
</div>
|
||||||
<table style="width:100%;">
|
<table>
|
||||||
<tbody>
|
<tr>
|
||||||
<tr style="text-align:center;">
|
<td>
|
||||||
<td class="">
|
<b>نام کالا:</b>
|
||||||
<p>
|
{{ doc.commodity.name is empty ? '×' : doc.commodity.name }}</td>
|
||||||
<b>نام:
|
<td>
|
||||||
</b>
|
<b>مدل:</b>
|
||||||
{{ doc.person.nikename }}
|
{{ doc.model is empty ? '×' : doc.model }}</td>
|
||||||
</p>
|
<td>
|
||||||
</td>
|
<b>رنگ:</b>
|
||||||
<td class="center">
|
{{ doc.color is empty ? '×' : doc.color }}</td>
|
||||||
<p>
|
<td>
|
||||||
<b>تلفن همراه</b>
|
<b>سریال:</b>
|
||||||
{{ doc.person.mobile }}
|
{{ doc.serial is empty ? '×' : doc.serial }}</td>
|
||||||
</p>
|
<td>
|
||||||
</td>
|
<b>پلاک:</b>
|
||||||
|
{{ doc.pelak is empty ? '×' : doc.pelak }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="" colspan="2">
|
<td colspan="4">
|
||||||
<p>
|
<p>
|
||||||
<b>آدرس:
|
<b>شرح:</b>
|
||||||
</b>
|
{{ doc.des is empty ? '×' : doc.des }}</p>
|
||||||
{{ doc.person.address }}
|
</td>
|
||||||
</p>
|
<td>
|
||||||
|
<p>
|
||||||
|
<b>متعلقات:</b>
|
||||||
|
{{ doc.motaleghat is empty ? '×' : doc.motaleghat }}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:100%; border:1px solid black;border-radius: 8px;margin-top:5px;text-align:center;">
|
|
||||||
<div class="tg-wrap" style="width:100%;border-radius: 8px 8px 0px 0px;text-align:center;background-color:gray">
|
<div class="bottom-container">
|
||||||
<b style="color:white;">اطلاعات</b>
|
<div class="signature">
|
||||||
|
<div class="section-header">
|
||||||
|
<b>مهر و امضا</b>
|
||||||
</div>
|
</div>
|
||||||
<table style="width:100%;">
|
<table>
|
||||||
<tbody class="det">
|
|
||||||
<tr style="text-align:center;">
|
|
||||||
<td class="">
|
|
||||||
<p>
|
|
||||||
<b>نام کالا:
|
|
||||||
</b>
|
|
||||||
{{ doc.commodity.name }}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td class="center">
|
|
||||||
<p>
|
|
||||||
<b> مدل:
|
|
||||||
</b>
|
|
||||||
{{ doc.model }}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td class="center">
|
|
||||||
<p>
|
|
||||||
<b> رنگ:
|
|
||||||
</b>
|
|
||||||
{{ doc.color }}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td class="center">
|
|
||||||
<p>
|
|
||||||
<b> سریال:
|
|
||||||
</b>
|
|
||||||
{{ doc.serial }}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td class="center">
|
|
||||||
<p>
|
|
||||||
<b> پلاک:
|
|
||||||
</b>
|
|
||||||
{{ doc.pelak }}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="" colspan="4">
|
<td class="signature-text">
|
||||||
<p>
|
|
||||||
<b>شرح:
|
|
||||||
</b>
|
|
||||||
{{ doc.des }}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td class="" colspan="1">
|
|
||||||
<p>
|
|
||||||
<b>متعلقات:
|
|
||||||
</b>
|
|
||||||
{{ doc.motaleghat }}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div style="width:40%;margin-top:20px;text-align:center;float:left;">
|
|
||||||
<table style="width:100%;">
|
|
||||||
<tbody>
|
|
||||||
<tr class="">
|
|
||||||
<td class="center" style="height:90px">
|
|
||||||
<h4>
|
<h4>
|
||||||
مهر و امضا تحویل گیرنده
|
تحویل گیرنده
|
||||||
<br>
|
<br>
|
||||||
<b>{{ doc.submitter.fullname }}</b>
|
<b>{{ doc.submitter.fullname }}</b>
|
||||||
<br>
|
|
||||||
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="80"/>
|
|
||||||
</h4>
|
</h4>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
<td class="signature-seal">
|
||||||
</tbody>
|
<img src="{{ url('front_seal_file_get', {id: bid.id}) }}" alt="مهر" style="max-width: 120px; height: auto;"/>
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="width:60%;margin-top:5px;text-align:left;float:right;">
|
|
||||||
<table style="width:100%;">
|
|
||||||
<tbody>
|
|
||||||
<tr class="">
|
|
||||||
<td class="" style="">
|
|
||||||
{{ printOptions.repserviceNoteString}}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="notes">
|
||||||
|
<div class="section-header">
|
||||||
|
<b>توضیحات</b>
|
||||||
|
</div>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="notes-content">
|
||||||
|
{{ printOptions.repserviceNoteString | raw }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
{% endblock %}
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
"@date-io/date-fns-jalali": "^3.2.0",
|
"@date-io/date-fns-jalali": "^3.2.0",
|
||||||
"@mdi/font": "^7.4.47",
|
"@mdi/font": "^7.4.47",
|
||||||
"@syncfusion/ej2-vue-dropdowns": "^21.2.5",
|
"@syncfusion/ej2-vue-dropdowns": "^21.2.5",
|
||||||
|
"@tiptap/extension-text-align": "^2.11.7",
|
||||||
|
"@tiptap/pm": "^2.11.7",
|
||||||
|
"@tiptap/starter-kit": "^2.11.7",
|
||||||
|
"@tiptap/vue-3": "^2.11.7",
|
||||||
"@vuelidate/core": "^2.0.0",
|
"@vuelidate/core": "^2.0.0",
|
||||||
"@vuelidate/validators": "^2.0.0",
|
"@vuelidate/validators": "^2.0.0",
|
||||||
"@vueuse/core": "^12.0.0",
|
"@vueuse/core": "^12.0.0",
|
||||||
|
|
232
webUI/src/components/Editor.vue
Normal file
232
webUI/src/components/Editor.vue
Normal file
|
@ -0,0 +1,232 @@
|
||||||
|
<template>
|
||||||
|
<div class="editor-container">
|
||||||
|
<div v-if="title" class="editor-title">{{ title }}</div>
|
||||||
|
<div class="editor-toolbar" v-show="editor">
|
||||||
|
<v-btn
|
||||||
|
@click="editor?.chain().focus().toggleBold().run()"
|
||||||
|
:class="{ 'is-active': isBold }"
|
||||||
|
variant="text"
|
||||||
|
density="compact"
|
||||||
|
>
|
||||||
|
<v-icon icon="mdi-format-bold"></v-icon>
|
||||||
|
<v-tooltip activator="parent" location="bottom">پررنگ</v-tooltip>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
@click="editor?.chain().focus().toggleItalic().run()"
|
||||||
|
:class="{ 'is-active': isItalic }"
|
||||||
|
variant="text"
|
||||||
|
density="compact"
|
||||||
|
>
|
||||||
|
<v-icon icon="mdi-format-italic"></v-icon>
|
||||||
|
<v-tooltip activator="parent" location="bottom">ایتالیک</v-tooltip>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
@click="editor?.chain().focus().toggleBulletList().run()"
|
||||||
|
:class="{ 'is-active': isBulletList }"
|
||||||
|
variant="text"
|
||||||
|
density="compact"
|
||||||
|
>
|
||||||
|
<v-icon icon="mdi-format-list-bulleted"></v-icon>
|
||||||
|
<v-tooltip activator="parent" location="bottom">لیست نقطهای</v-tooltip>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
@click="editor?.chain().focus().toggleOrderedList().run()"
|
||||||
|
:class="{ 'is-active': isOrderedList }"
|
||||||
|
variant="text"
|
||||||
|
density="compact"
|
||||||
|
>
|
||||||
|
<v-icon icon="mdi-format-list-numbered"></v-icon>
|
||||||
|
<v-tooltip activator="parent" location="bottom">لیست شمارهدار</v-tooltip>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
@click="editor?.chain().focus().setTextAlign('right').run()"
|
||||||
|
:class="{ 'is-active': isRightAlign }"
|
||||||
|
variant="text"
|
||||||
|
density="compact"
|
||||||
|
>
|
||||||
|
<v-icon icon="mdi-format-align-right"></v-icon>
|
||||||
|
<v-tooltip activator="parent" location="bottom">راستچین</v-tooltip>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
@click="editor?.chain().focus().setTextAlign('center').run()"
|
||||||
|
:class="{ 'is-active': isCenterAlign }"
|
||||||
|
variant="text"
|
||||||
|
density="compact"
|
||||||
|
>
|
||||||
|
<v-icon icon="mdi-format-align-center"></v-icon>
|
||||||
|
<v-tooltip activator="parent" location="bottom">وسطچین</v-tooltip>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
@click="editor?.chain().focus().setTextAlign('left').run()"
|
||||||
|
:class="{ 'is-active': isLeftAlign }"
|
||||||
|
variant="text"
|
||||||
|
density="compact"
|
||||||
|
>
|
||||||
|
<v-icon icon="mdi-format-align-left"></v-icon>
|
||||||
|
<v-tooltip activator="parent" location="bottom">چپچین</v-tooltip>
|
||||||
|
</v-btn>
|
||||||
|
</div>
|
||||||
|
<editor-content v-show="editor" :editor="editor" class="editor-content" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { EditorContent, Editor } from '@tiptap/vue-3'
|
||||||
|
import StarterKit from '@tiptap/starter-kit'
|
||||||
|
import TextAlign from '@tiptap/extension-text-align'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CustomEditor',
|
||||||
|
components: {
|
||||||
|
EditorContent
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
modelValue: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
editor: null,
|
||||||
|
isBold: false,
|
||||||
|
isItalic: false,
|
||||||
|
isBulletList: false,
|
||||||
|
isOrderedList: false,
|
||||||
|
isRightAlign: false,
|
||||||
|
isCenterAlign: false,
|
||||||
|
isLeftAlign: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
decodeHTML(html) {
|
||||||
|
if (!html) return '';
|
||||||
|
const txt = document.createElement("textarea");
|
||||||
|
txt.innerHTML = html;
|
||||||
|
return txt.value;
|
||||||
|
},
|
||||||
|
updateToolbarState() {
|
||||||
|
if (!this.editor) return;
|
||||||
|
this.isBold = this.editor.isActive('bold');
|
||||||
|
this.isItalic = this.editor.isActive('italic');
|
||||||
|
this.isBulletList = this.editor.isActive('bulletList');
|
||||||
|
this.isOrderedList = this.editor.isActive('orderedList');
|
||||||
|
this.isRightAlign = this.editor.isActive({ textAlign: 'right' });
|
||||||
|
this.isCenterAlign = this.editor.isActive({ textAlign: 'center' });
|
||||||
|
this.isLeftAlign = this.editor.isActive({ textAlign: 'left' });
|
||||||
|
},
|
||||||
|
initEditor() {
|
||||||
|
const decodedContent = this.decodeHTML(this.modelValue);
|
||||||
|
this.editor = new Editor({
|
||||||
|
content: decodedContent,
|
||||||
|
extensions: [
|
||||||
|
StarterKit,
|
||||||
|
TextAlign.configure({
|
||||||
|
types: ['heading', 'paragraph'],
|
||||||
|
alignments: ['left', 'center', 'right'],
|
||||||
|
defaultAlignment: 'right'
|
||||||
|
})
|
||||||
|
],
|
||||||
|
onUpdate: ({ editor }) => {
|
||||||
|
this.$emit('update:modelValue', editor.getHTML());
|
||||||
|
this.updateToolbarState();
|
||||||
|
},
|
||||||
|
onSelectionUpdate: () => {
|
||||||
|
this.updateToolbarState();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.updateToolbarState();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
modelValue: {
|
||||||
|
immediate: true,
|
||||||
|
handler(newValue) {
|
||||||
|
if (this.editor && newValue !== this.editor.getHTML()) {
|
||||||
|
const decodedContent = this.decodeHTML(newValue);
|
||||||
|
this.editor.commands.setContent(decodedContent);
|
||||||
|
this.updateToolbarState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initEditor();
|
||||||
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
this.editor?.destroy()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.editor-container {
|
||||||
|
border: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 8px;
|
||||||
|
background: rgb(var(--v-theme-surface));
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-title {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-toolbar {
|
||||||
|
display: flex;
|
||||||
|
gap: 4px;
|
||||||
|
padding: 8px;
|
||||||
|
border-bottom: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
|
||||||
|
margin-bottom: 8px;
|
||||||
|
background: rgb(var(--v-theme-surface));
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-toolbar .v-btn {
|
||||||
|
min-width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-toolbar .v-btn.is-active {
|
||||||
|
background-color: rgba(var(--v-theme-primary), 0.1);
|
||||||
|
color: rgb(var(--v-theme-primary));
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-content {
|
||||||
|
min-height: 200px;
|
||||||
|
padding: 8px;
|
||||||
|
direction: rtl;
|
||||||
|
text-align: right;
|
||||||
|
background: rgb(var(--v-theme-surface));
|
||||||
|
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-content:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-content :deep(.ProseMirror) {
|
||||||
|
outline: none !important;
|
||||||
|
min-height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-content :deep(.ProseMirror:focus) {
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-content :deep(.ProseMirror p) {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-content :deep(.ProseMirror ul),
|
||||||
|
.editor-content :deep(.ProseMirror ol) {
|
||||||
|
padding-right: 24px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -146,12 +146,12 @@ import money from 'v-money3';
|
||||||
import Vue3PersianDatetimePicker from 'vue3-persian-datetime-picker';
|
import Vue3PersianDatetimePicker from 'vue3-persian-datetime-picker';
|
||||||
import Swal from "sweetalert2";
|
import Swal from "sweetalert2";
|
||||||
import { getApiUrl } from "@/hesabixConfig";
|
import { getApiUrl } from "@/hesabixConfig";
|
||||||
const app = createApp(App)
|
|
||||||
app.component('EasyDataTable', Vue3EasyDataTable);
|
|
||||||
app.component('DatePicker', Vue3PersianDatetimePicker);
|
|
||||||
import vSelect from 'vue-select'
|
import vSelect from 'vue-select'
|
||||||
import 'vue-select/dist/vue-select.css';
|
import 'vue-select/dist/vue-select.css';
|
||||||
|
|
||||||
|
const app = createApp(App)
|
||||||
|
app.component('EasyDataTable', Vue3EasyDataTable);
|
||||||
|
app.component('DatePicker', Vue3PersianDatetimePicker);
|
||||||
app.component('v-cob', vSelect)
|
app.component('v-cob', vSelect)
|
||||||
import Hdatepicker from "@/components/forms/Hdatepicker.vue";
|
import Hdatepicker from "@/components/forms/Hdatepicker.vue";
|
||||||
import calendarLocalConfig from "@/i18n/calendarLocalConfig";
|
import calendarLocalConfig from "@/i18n/calendarLocalConfig";
|
||||||
|
|
|
@ -42,284 +42,179 @@
|
||||||
<v-tabs-window-item value="0">
|
<v-tabs-window-item value="0">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<div class="row">
|
<v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-col cols="12">
|
||||||
<div class="form-check form-switch">
|
<v-row dense>
|
||||||
<input class="form-check-input" v-model="settings.sell.bidInfo" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">اطلاعات کسبوکار</label>
|
<v-switch v-model="settings.sell.bidInfo" label="اطلاعات کسبوکار" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-switch v-model="settings.sell.pays" label="نمایش پرداختهای فاکتور" color="primary" hide-details density="compact"></v-switch>
|
||||||
<div class="form-check form-switch">
|
</v-col>
|
||||||
<input class="form-check-input" v-model="settings.sell.pays" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">نمایش پرداختهای فاکتور</label>
|
<v-switch v-model="settings.sell.note" label="یادداشت پایین فاکتور" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-switch v-model="settings.sell.taxInfo" label="مالیات به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
|
||||||
<div class="form-check form-switch">
|
</v-col>
|
||||||
<input class="form-check-input" v-model="settings.sell.note" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">یادداشت پایین فاکتور</label>
|
<v-switch v-model="settings.sell.discountInfo" label="تخفیف به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
</v-col>
|
||||||
<div class="form-check form-switch">
|
</v-row>
|
||||||
<input class="form-check-input" v-model="settings.sell.taxInfo" type="checkbox">
|
<v-row>
|
||||||
<label class="form-check-label">مالیات به تفکیک اقلام</label>
|
<v-col cols="12" md="6">
|
||||||
</div>
|
<v-textarea v-model="settings.sell.noteString" label="یادداشت پایین فاکتور" rows="4"
|
||||||
</div>
|
placeholder="این نوشته در پایین فاکتورها چاپ خواهد شد"></v-textarea>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
</v-col>
|
||||||
<div class="form-check form-switch">
|
<v-col cols="12" md="6">
|
||||||
<input class="form-check-input" v-model="settings.sell.discountInfo" type="checkbox">
|
<v-select v-model="settings.sell.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
|
||||||
<label class="form-check-label">تخفیف به تفکیک اقلام</label>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
|
||||||
<div class="form-floating">
|
|
||||||
<textarea v-model="settings.sell.noteString" class="form-control"
|
|
||||||
placeholder="این نوشته در پایین فاکتورها چاپ خواهد شد" style="height: 100px"></textarea>
|
|
||||||
<label for="floatingTextarea2">یادداشت پایین فاکتور</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
|
||||||
<div class="form-floating">
|
|
||||||
<select v-model="settings.sell.paper" class="form-select">
|
|
||||||
<option value="A4-L">A4 افقی</option>
|
|
||||||
<option value="A4">A4 عمودی</option>
|
|
||||||
<option value="A5-L">A5 افقی</option>
|
|
||||||
<option value="A5">A5 عمودی</option>
|
|
||||||
</select>
|
|
||||||
<label>سایز کاغذ و حالت چاپ</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-tabs-window-item>
|
</v-tabs-window-item>
|
||||||
<v-tabs-window-item value="1">
|
<v-tabs-window-item value="1">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<div class="row">
|
<v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-col cols="12">
|
||||||
<div class="form-check form-switch">
|
<v-row dense>
|
||||||
<input class="form-check-input" v-model="settings.buy.bidInfo" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">اطلاعات کسبوکار</label>
|
<v-switch v-model="settings.buy.bidInfo" label="اطلاعات کسبوکار" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-switch v-model="settings.buy.pays" label="نمایش پرداختهای فاکتور" color="primary" hide-details density="compact"></v-switch>
|
||||||
<div class="form-check form-switch">
|
</v-col>
|
||||||
<input class="form-check-input" v-model="settings.buy.pays" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">نمایش پرداختهای فاکتور</label>
|
<v-switch v-model="settings.buy.note" label="یادداشت پایین فاکتور" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-switch v-model="settings.buy.taxInfo" label="مالیات به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
|
||||||
<div class="form-check form-switch">
|
</v-col>
|
||||||
<input class="form-check-input" v-model="settings.buy.note" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">یادداشت پایین فاکتور</label>
|
<v-switch v-model="settings.buy.discountInfo" label="تخفیف به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
</v-col>
|
||||||
<div class="form-check form-switch">
|
</v-row>
|
||||||
<input class="form-check-input" v-model="settings.buy.taxInfo" type="checkbox">
|
<v-row>
|
||||||
<label class="form-check-label">مالیات به تفکیک اقلام</label>
|
<v-col cols="12" md="6">
|
||||||
</div>
|
<v-textarea v-model="settings.buy.noteString" label="یادداشت پایین فاکتور" rows="4"
|
||||||
</div>
|
placeholder="این نوشته در پایین فاکتورها چاپ خواهد شد"></v-textarea>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
</v-col>
|
||||||
<div class="form-check form-switch">
|
<v-col cols="12" md="6">
|
||||||
<input class="form-check-input" v-model="settings.buy.discountInfo" type="checkbox">
|
<v-select v-model="settings.buy.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
|
||||||
<label class="form-check-label">تخفیف به تفکیک اقلام</label>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
|
||||||
<div class="form-floating">
|
|
||||||
<textarea v-model="settings.buy.noteString" class="form-control"
|
|
||||||
placeholder="این نوشته در پایین فاکتورها چاپ خواهد شد" style="height: 100px"></textarea>
|
|
||||||
<label for="floatingTextarea2">یادداشت پایین فاکتور</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
|
||||||
<div class="form-floating">
|
|
||||||
<select v-model="settings.buy.paper" class="form-select">
|
|
||||||
<option value="A4-L">A4 افقی</option>
|
|
||||||
<option value="A4">A4 عمودی</option>
|
|
||||||
<option value="A5-L">A5 افقی</option>
|
|
||||||
<option value="A5">A5 عمودی</option>
|
|
||||||
</select>
|
|
||||||
<label>سایز کاغذ و حالت چاپ</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-tabs-window-item>
|
</v-tabs-window-item>
|
||||||
<v-tabs-window-item value="2">
|
<v-tabs-window-item value="2">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<div class="row">
|
<v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-col cols="12">
|
||||||
<div class="form-check form-switch">
|
<v-row dense>
|
||||||
<input class="form-check-input" v-model="settings.rfbuy.bidInfo" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">اطلاعات کسبوکار</label>
|
<v-switch v-model="settings.rfbuy.bidInfo" label="اطلاعات کسبوکار" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-switch v-model="settings.rfbuy.pays" label="نمایش پرداختهای فاکتور" color="primary" hide-details density="compact"></v-switch>
|
||||||
<div class="form-check form-switch">
|
</v-col>
|
||||||
<input class="form-check-input" v-model="settings.rfbuy.pays" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">نمایش پرداختهای فاکتور</label>
|
<v-switch v-model="settings.rfbuy.note" label="یادداشت پایین فاکتور" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-switch v-model="settings.rfbuy.taxInfo" label="مالیات به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
|
||||||
<div class="form-check form-switch">
|
</v-col>
|
||||||
<input class="form-check-input" v-model="settings.rfbuy.note" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">یادداشت پایین فاکتور</label>
|
<v-switch v-model="settings.rfbuy.discountInfo" label="تخفیف به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
</v-col>
|
||||||
<div class="form-check form-switch">
|
</v-row>
|
||||||
<input class="form-check-input" v-model="settings.rfbuy.taxInfo" type="checkbox">
|
<v-row>
|
||||||
<label class="form-check-label">مالیات به تفکیک اقلام</label>
|
<v-col cols="12" md="6">
|
||||||
</div>
|
<v-textarea v-model="settings.rfbuy.noteString" label="یادداشت پایین فاکتور" rows="4"
|
||||||
</div>
|
placeholder="این نوشته در پایین فاکتورها چاپ خواهد شد"></v-textarea>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
</v-col>
|
||||||
<div class="form-check form-switch">
|
<v-col cols="12" md="6">
|
||||||
<input class="form-check-input" v-model="settings.rfbuy.discountInfo" type="checkbox">
|
<v-select v-model="settings.rfbuy.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
|
||||||
<label class="form-check-label">تخفیف به تفکیک اقلام</label>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
|
||||||
<div class="form-floating">
|
|
||||||
<textarea v-model="settings.rfbuy.noteString" class="form-control"
|
|
||||||
placeholder="این نوشته در پایین فاکتورها چاپ خواهد شد" style="height: 100px"></textarea>
|
|
||||||
<label for="floatingTextarea2">یادداشت پایین فاکتور</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
|
||||||
<div class="form-floating">
|
|
||||||
<select v-model="settings.rfbuy.paper" class="form-select">
|
|
||||||
<option value="A4-L">A4 افقی</option>
|
|
||||||
<option value="A4">A4 عمودی</option>
|
|
||||||
<option value="A5-L">A5 افقی</option>
|
|
||||||
<option value="A5">A5 عمودی</option>
|
|
||||||
</select>
|
|
||||||
<label>سایز کاغذ و حالت چاپ</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-tabs-window-item>
|
</v-tabs-window-item>
|
||||||
<v-tabs-window-item value="3">
|
<v-tabs-window-item value="3">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<div class="row">
|
<v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-col cols="12">
|
||||||
<div class="form-check form-switch">
|
<v-row dense>
|
||||||
<input class="form-check-input" v-model="settings.rfsell.bidInfo" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">اطلاعات کسبوکار</label>
|
<v-switch v-model="settings.rfsell.bidInfo" label="اطلاعات کسبوکار" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-switch v-model="settings.rfsell.pays" label="نمایش پرداختهای فاکتور" color="primary" hide-details density="compact"></v-switch>
|
||||||
<div class="form-check form-switch">
|
</v-col>
|
||||||
<input class="form-check-input" v-model="settings.rfsell.pays" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">نمایش پرداختهای فاکتور</label>
|
<v-switch v-model="settings.rfsell.note" label="یادداشت پایین فاکتور" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-switch v-model="settings.rfsell.taxInfo" label="مالیات به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
|
||||||
<div class="form-check form-switch">
|
</v-col>
|
||||||
<input class="form-check-input" v-model="settings.rfsell.note" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">یادداشت پایین فاکتور</label>
|
<v-switch v-model="settings.rfsell.discountInfo" label="تخفیف به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
</v-col>
|
||||||
<div class="form-check form-switch">
|
</v-row>
|
||||||
<input class="form-check-input" v-model="settings.rfsell.taxInfo" type="checkbox">
|
<v-row>
|
||||||
<label class="form-check-label">مالیات به تفکیک اقلام</label>
|
<v-col cols="12" md="6">
|
||||||
</div>
|
<v-textarea v-model="settings.rfsell.noteString" label="یادداشت پایین فاکتور" rows="4"
|
||||||
</div>
|
placeholder="این نوشته در پایین فاکتورها چاپ خواهد شد"></v-textarea>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
</v-col>
|
||||||
<div class="form-check form-switch">
|
<v-col cols="12" md="6">
|
||||||
<input class="form-check-input" v-model="settings.rfsell.discountInfo" type="checkbox">
|
<v-select v-model="settings.rfsell.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
|
||||||
<label class="form-check-label">تخفیف به تفکیک اقلام</label>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
|
||||||
<div class="form-floating">
|
|
||||||
<textarea v-model="settings.rfsell.noteString" class="form-control"
|
|
||||||
placeholder="این نوشته در پایین فاکتورها چاپ خواهد شد" style="height: 100px"></textarea>
|
|
||||||
<label for="floatingTextarea2">یادداشت پایین فاکتور</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
|
||||||
<div class="form-floating">
|
|
||||||
<select v-model="settings.rfsell.paper" class="form-select">
|
|
||||||
<option value="A4-L">A4 افقی</option>
|
|
||||||
<option value="A4">A4 عمودی</option>
|
|
||||||
<option value="A5-L">A5 افقی</option>
|
|
||||||
<option value="A5">A5 عمودی</option>
|
|
||||||
</select>
|
|
||||||
<label>سایز کاغذ و حالت چاپ</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-tabs-window-item>
|
</v-tabs-window-item>
|
||||||
<v-tabs-window-item value="4">
|
<v-tabs-window-item value="4">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<div class="row">
|
<v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-col cols="12">
|
||||||
<div class="form-check form-switch">
|
<v-row dense>
|
||||||
<input class="form-check-input" v-model="settings.fastsell.invoice" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">{{ $t('dialog.invoice') }}</label>
|
<v-switch v-model="settings.fastsell.invoice" :label="$t('dialog.invoice')" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-switch v-model="settings.fastsell.cashdeskTicket" :label="$t('dialog.cashdeskTicket')" color="primary" hide-details density="compact"></v-switch>
|
||||||
<div class="form-check form-switch">
|
</v-col>
|
||||||
<input class="form-check-input" v-model="settings.fastsell.cashdeskTicket" type="checkbox">
|
<v-col cols="12" sm="6" md="4" lg="3">
|
||||||
<label class="form-check-label">{{ $t('dialog.cashdeskTicket') }}</label>
|
<v-switch v-model="settings.fastsell.pdf" :label="$t('dialog.export_pdf')" color="primary" hide-details density="compact"></v-switch>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
</v-col>
|
||||||
<div class="form-check form-switch">
|
</v-row>
|
||||||
<input class="form-check-input" v-model="settings.fastsell.pdf" type="checkbox">
|
|
||||||
<label class="form-check-label">{{ $t('dialog.export_pdf') }}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-tabs-window-item>
|
</v-tabs-window-item>
|
||||||
<v-tabs-window-item value="5">
|
<v-tabs-window-item value="5">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<div class="row">
|
<v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
<v-col cols="12" md="6">
|
||||||
<div class="form-floating">
|
<CustomEditor title="یادداشت پایین قبض تعمیرات" v-model="settings.repservice.noteString" />
|
||||||
<textarea v-model="settings.repservice.noteString" class="form-control"
|
</v-col>
|
||||||
placeholder="این نوشته در پایین قبض چاپ خواهد شد" style="height: 100px"></textarea>
|
<v-col cols="12" md="6">
|
||||||
<label for="floatingTextarea2">قوانین تعمیرگاه</label>
|
<v-select v-model="settings.repservice.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
|
||||||
</div>
|
</v-col>
|
||||||
</div>
|
</v-row>
|
||||||
<div class="col-sm-12 col-md-6 mb-2">
|
|
||||||
<div class="form-floating">
|
|
||||||
<select v-model="settings.repservice.paper" class="form-select">
|
|
||||||
<option value="A4-L">A4 افقی</option>
|
|
||||||
<option value="A4">A4 عمودی</option>
|
|
||||||
<option value="A5-L">A5 افقی</option>
|
|
||||||
<option value="A5">A5 عمودی</option>
|
|
||||||
</select>
|
|
||||||
<label>سایز کاغذ و حالت چاپ</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-tabs-window-item>
|
</v-tabs-window-item>
|
||||||
|
@ -331,19 +226,27 @@
|
||||||
<script>
|
<script>
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import Swal from "sweetalert2";
|
import Swal from "sweetalert2";
|
||||||
import { ref } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import Loading from 'vue-loading-overlay';
|
import Loading from 'vue-loading-overlay';
|
||||||
import 'vue-loading-overlay/dist/css/index.css';
|
import 'vue-loading-overlay/dist/css/index.css';
|
||||||
|
import CustomEditor from '@/components/Editor.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "bussiness",
|
name: "bussiness",
|
||||||
components: {
|
components: {
|
||||||
Loading
|
Loading,
|
||||||
|
CustomEditor
|
||||||
},
|
},
|
||||||
data: () => {
|
data: () => ({
|
||||||
return {
|
|
||||||
loading: ref(false),
|
loading: ref(false),
|
||||||
tabs: 0,
|
tabs: 0,
|
||||||
plugins: [],
|
plugins: [],
|
||||||
|
paperOptions: [
|
||||||
|
{ title: 'A4 افقی', value: 'A4-L' },
|
||||||
|
{ title: 'A4 عمودی', value: 'A4' },
|
||||||
|
{ title: 'A5 افقی', value: 'A5-L' },
|
||||||
|
{ title: 'A5 عمودی', value: 'A5' }
|
||||||
|
],
|
||||||
settings: {
|
settings: {
|
||||||
sell: {
|
sell: {
|
||||||
pays: true,
|
pays: true,
|
||||||
|
@ -391,8 +294,7 @@ export default {
|
||||||
pdf: true
|
pdf: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}),
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
isPluginActive(plugName) {
|
isPluginActive(plugName) {
|
||||||
return this.plugins[plugName] !== undefined;
|
return this.plugins[plugName] !== undefined;
|
||||||
|
@ -428,4 +330,6 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in a new issue