progress in repservice print ticket

This commit is contained in:
Hesabix 2025-04-05 22:01:47 +00:00
parent 78e184748c
commit 98785231a7
5 changed files with 712 additions and 470 deletions

View file

@ -1,196 +1,298 @@
<!DOCTYPE html>
<html lang="fa" direction="rtl"></html>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<head>
<style>
.center {
text-align: center;
}
.text-white {
color: white;
}
.stimol td,
.stimol th {
border: 1px solid black;
}
.item {
height: 40px;
}
.det tr {
height: 40px;
}
</style>
</head>
<body style="direction:rtl; width:100%">
<div class="block-content pt-1 pb-3 d-none d-sm-block">
<div class="c-print container-xl">
<div class="tg-wrap" style="width:100%; border:1px solid black;border-radius: 8px;">
<table class="rounded" style="width:100%;">
<thead>
{% block content %}
<!DOCTYPE html>
<html lang="fa" direction="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
@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;
}
.section table {
width: 100%;
border-collapse: collapse;
}
.section td {
padding: 4px;
line-height: 1.8;
}
.section p {
margin-bottom: 8px;
}
.bottom-container {
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>
</head>
<body>
<div class="container">
<div class="header">
<table>
<tr>
<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 style="width:60%; text-align:center">
<h3 class="">{{ bid.name }}</h3>
<br/>
<h4 class="">رسید تحویل کالا</h4>
<h3>{{ bid.name }}</h3>
<h4>رسید تحویل کالا</h4>
<h4>{{bid.name}}</h4>
</td>
<td style="width:20%">
<h4>
<b>تاریخ:</b>
{{ doc.date }}</h4>
<br/>
<h4>
<b>شماره:</b>
{{ doc.code }}</h4>
</td>
</tr>
<tr>
<td style="width:100%" colspan="3">
<p>
<b>آدرس:
</b>
استان
{{ bid.ostan }}، شهر
{{ bid.shahrestan }}،
{{ bid.address }}
</p>
<p>
<b>تلفن تماس:</b>{{ bid.tel }}
</p>
</td>
</tr>
</thead>
</table>
</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">
<b style="color:white;">مشتری</b>
</table>
</div>
<table style="width:100%;">
<tbody>
<tr style="text-align:center;">
<td class="">
<p>
<b>نام:
</b>
{{ doc.person.nikename }}
</p>
</td>
<td class="center">
<p>
<b>تلفن همراه</b>
{{ doc.person.mobile }}
</p>
</td>
</tr>
<div class="section">
<div class="section-header">
<b>اطلاعات {{bid.type}}</b>
</div>
<table>
<tr>
<td class="" colspan="2">
<p>
<b>آدرس:
</b>
{{ doc.person.address }}
</p>
<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>
</tbody>
</table>
</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">
<b style="color:white;">اطلاعات</b>
</table>
</div>
<table style="width:100%;">
<tbody class="det">
<tr style="text-align:center;">
<td class="">
<div class="section">
<div class="section-header">
<b>مشتری</b>
</div>
<table>
<tr>
<td>
<p>
<b>نام کالا:
</b>
{{ doc.commodity.name }}
</p>
<b>نام:</b>
{{ doc.person.nikename }}</p>
</td>
<td class="center">
<td>
<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>
<b>تلفن همراه:</b>
{{ doc.person.mobile }}</p>
</td>
</tr>
<tr>
<td class="" colspan="4">
<td colspan="2">
<p>
<b>شرح:
</b>
{{ doc.des }}
</p>
<b>آدرس:</b>
{{ doc.person.address }}</p>
</td>
<td class="" colspan="1">
</tr>
</table>
</div>
<div class="section">
<div class="section-header">
<b>اطلاعات کالا</b>
</div>
<table>
<tr>
<td>
<b>نام کالا:</b>
{{ doc.commodity.name is empty ? '×' : doc.commodity.name }}</td>
<td>
<b>مدل:</b>
{{ doc.model is empty ? '×' : doc.model }}</td>
<td>
<b>رنگ:</b>
{{ doc.color is empty ? '×' : doc.color }}</td>
<td>
<b>سریال:</b>
{{ doc.serial is empty ? '×' : doc.serial }}</td>
<td>
<b>پلاک:</b>
{{ doc.pelak is empty ? '×' : doc.pelak }}</td>
</tr>
<tr>
<td colspan="4">
<p>
<b>متعلقات:
</b>
{{ doc.motaleghat }}
</p>
<b>شرح:</b>
{{ doc.des is empty ? '×' : doc.des }}</p>
</td>
<td>
<p>
<b>متعلقات:</b>
{{ doc.motaleghat is empty ? '×' : 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>
مهر و امضا تحویل گیرنده
<br>
<b>{{ doc.submitter.fullname }}</b>
<br>
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="80"/>
</h4>
</td>
</tr>
</tbody>
</table>
</div>
</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>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</body>
<div class="bottom-container">
<div class="signature">
<div class="section-header">
<b>مهر و امضا</b>
</div>
<table>
<tr>
<td class="signature-text">
<h4>
تحویل گیرنده
<br>
<b>{{ doc.submitter.fullname }}</b>
</h4>
</td>
<td class="signature-seal">
<img src="{{ url('front_seal_file_get', {id: bid.id}) }}" alt="مهر" style="max-width: 120px; height: auto;"/>
</td>
</tr>
</table>
</div>
</html>
<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>
</body>
</html>
{% endblock %}

View file

@ -18,6 +18,10 @@
"@date-io/date-fns-jalali": "^3.2.0",
"@mdi/font": "^7.4.47",
"@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/validators": "^2.0.0",
"@vueuse/core": "^12.0.0",

View 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>

View file

@ -146,12 +146,12 @@ import money from 'v-money3';
import Vue3PersianDatetimePicker from 'vue3-persian-datetime-picker';
import Swal from "sweetalert2";
import { getApiUrl } from "@/hesabixConfig";
const app = createApp(App)
app.component('EasyDataTable', Vue3EasyDataTable);
app.component('DatePicker', Vue3PersianDatetimePicker);
import vSelect from 'vue-select'
import 'vue-select/dist/vue-select.css';
const app = createApp(App)
app.component('EasyDataTable', Vue3EasyDataTable);
app.component('DatePicker', Vue3PersianDatetimePicker);
app.component('v-cob', vSelect)
import Hdatepicker from "@/components/forms/Hdatepicker.vue";
import calendarLocalConfig from "@/i18n/calendarLocalConfig";

View file

@ -42,284 +42,179 @@
<v-tabs-window-item value="0">
<v-card>
<v-card-text>
<div class="row">
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.sell.bidInfo" type="checkbox">
<label class="form-check-label">اطلاعات کسبوکار</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.sell.pays" type="checkbox">
<label class="form-check-label">نمایش پرداختهای فاکتور</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.sell.note" type="checkbox">
<label class="form-check-label">یادداشت پایین فاکتور</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.sell.taxInfo" type="checkbox">
<label class="form-check-label">مالیات به تفکیک اقلام</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.sell.discountInfo" type="checkbox">
<label class="form-check-label">تخفیف به تفکیک اقلام</label>
</div>
</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-row>
<v-col cols="12">
<v-row dense>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.sell.bidInfo" label="اطلاعات کسب‌وکار" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.sell.pays" label="نمایش پرداخت‌های فاکتور" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.sell.note" label="یادداشت پایین فاکتور" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.sell.taxInfo" label="مالیات به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.sell.discountInfo" label="تخفیف به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row>
<v-col cols="12" md="6">
<v-textarea v-model="settings.sell.noteString" label="یادداشت پایین فاکتور" rows="4"
placeholder="این نوشته در پایین فاکتور‌ها چاپ خواهد شد"></v-textarea>
</v-col>
<v-col cols="12" md="6">
<v-select v-model="settings.sell.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-tabs-window-item>
<v-tabs-window-item value="1">
<v-card>
<v-card-text>
<div class="row">
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.buy.bidInfo" type="checkbox">
<label class="form-check-label">اطلاعات کسبوکار</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.buy.pays" type="checkbox">
<label class="form-check-label">نمایش پرداختهای فاکتور</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.buy.note" type="checkbox">
<label class="form-check-label">یادداشت پایین فاکتور</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.buy.taxInfo" type="checkbox">
<label class="form-check-label">مالیات به تفکیک اقلام</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.buy.discountInfo" type="checkbox">
<label class="form-check-label">تخفیف به تفکیک اقلام</label>
</div>
</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-row>
<v-col cols="12">
<v-row dense>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.buy.bidInfo" label="اطلاعات کسب‌وکار" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.buy.pays" label="نمایش پرداخت‌های فاکتور" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.buy.note" label="یادداشت پایین فاکتور" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.buy.taxInfo" label="مالیات به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.buy.discountInfo" label="تخفیف به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row>
<v-col cols="12" md="6">
<v-textarea v-model="settings.buy.noteString" label="یادداشت پایین فاکتور" rows="4"
placeholder="این نوشته در پایین فاکتور‌ها چاپ خواهد شد"></v-textarea>
</v-col>
<v-col cols="12" md="6">
<v-select v-model="settings.buy.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-tabs-window-item>
<v-tabs-window-item value="2">
<v-card>
<v-card-text>
<div class="row">
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfbuy.bidInfo" type="checkbox">
<label class="form-check-label">اطلاعات کسبوکار</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfbuy.pays" type="checkbox">
<label class="form-check-label">نمایش پرداختهای فاکتور</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfbuy.note" type="checkbox">
<label class="form-check-label">یادداشت پایین فاکتور</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfbuy.taxInfo" type="checkbox">
<label class="form-check-label">مالیات به تفکیک اقلام</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfbuy.discountInfo" type="checkbox">
<label class="form-check-label">تخفیف به تفکیک اقلام</label>
</div>
</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-row>
<v-col cols="12">
<v-row dense>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfbuy.bidInfo" label="اطلاعات کسب‌وکار" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfbuy.pays" label="نمایش پرداخت‌های فاکتور" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfbuy.note" label="یادداشت پایین فاکتور" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfbuy.taxInfo" label="مالیات به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfbuy.discountInfo" label="تخفیف به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row>
<v-col cols="12" md="6">
<v-textarea v-model="settings.rfbuy.noteString" label="یادداشت پایین فاکتور" rows="4"
placeholder="این نوشته در پایین فاکتور‌ها چاپ خواهد شد"></v-textarea>
</v-col>
<v-col cols="12" md="6">
<v-select v-model="settings.rfbuy.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-tabs-window-item>
<v-tabs-window-item value="3">
<v-card>
<v-card-text>
<div class="row">
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfsell.bidInfo" type="checkbox">
<label class="form-check-label">اطلاعات کسبوکار</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfsell.pays" type="checkbox">
<label class="form-check-label">نمایش پرداختهای فاکتور</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfsell.note" type="checkbox">
<label class="form-check-label">یادداشت پایین فاکتور</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfsell.taxInfo" type="checkbox">
<label class="form-check-label">مالیات به تفکیک اقلام</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.rfsell.discountInfo" type="checkbox">
<label class="form-check-label">تخفیف به تفکیک اقلام</label>
</div>
</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-row>
<v-col cols="12">
<v-row dense>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfsell.bidInfo" label="اطلاعات کسب‌وکار" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfsell.pays" label="نمایش پرداخت‌های فاکتور" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfsell.note" label="یادداشت پایین فاکتور" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfsell.taxInfo" label="مالیات به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.rfsell.discountInfo" label="تخفیف به تفکیک اقلام" color="primary" hide-details density="compact"></v-switch>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row>
<v-col cols="12" md="6">
<v-textarea v-model="settings.rfsell.noteString" label="یادداشت پایین فاکتور" rows="4"
placeholder="این نوشته در پایین فاکتور‌ها چاپ خواهد شد"></v-textarea>
</v-col>
<v-col cols="12" md="6">
<v-select v-model="settings.rfsell.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-tabs-window-item>
<v-tabs-window-item value="4">
<v-card>
<v-card-text>
<div class="row">
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.fastsell.invoice" type="checkbox">
<label class="form-check-label">{{ $t('dialog.invoice') }}</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<input class="form-check-input" v-model="settings.fastsell.cashdeskTicket" type="checkbox">
<label class="form-check-label">{{ $t('dialog.cashdeskTicket') }}</label>
</div>
</div>
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-check form-switch">
<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-row>
<v-col cols="12">
<v-row dense>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.fastsell.invoice" :label="$t('dialog.invoice')" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.fastsell.cashdeskTicket" :label="$t('dialog.cashdeskTicket')" color="primary" hide-details density="compact"></v-switch>
</v-col>
<v-col cols="12" sm="6" md="4" lg="3">
<v-switch v-model="settings.fastsell.pdf" :label="$t('dialog.export_pdf')" color="primary" hide-details density="compact"></v-switch>
</v-col>
</v-row>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-tabs-window-item>
<v-tabs-window-item value="5">
<v-card>
<v-card-text>
<div class="row">
<div class="col-sm-12 col-md-6 mb-2">
<div class="form-floating">
<textarea v-model="settings.repservice.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.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-row>
<v-col cols="12" md="6">
<CustomEditor title="یادداشت پایین قبض تعمیرات" v-model="settings.repservice.noteString" />
</v-col>
<v-col cols="12" md="6">
<v-select v-model="settings.repservice.paper" :items="paperOptions" label="سایز کاغذ و حالت چاپ"></v-select>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-tabs-window-item>
@ -331,68 +226,75 @@
<script>
import axios from "axios";
import Swal from "sweetalert2";
import { ref } from "vue";
import { ref, onMounted } from "vue";
import Loading from 'vue-loading-overlay';
import 'vue-loading-overlay/dist/css/index.css';
import CustomEditor from '@/components/Editor.vue'
export default {
name: "bussiness",
components: {
Loading
Loading,
CustomEditor
},
data: () => {
return {
loading: ref(false),
tabs: 0,
plugins: [],
settings: {
sell: {
pays: true,
note: true,
noteString: '',
bidInfo: true,
taxInfo: true,
discountInfo: true,
paper: 'A4-L',
},
buy: {
pays: true,
note: true,
noteString: '',
bidInfo: true,
taxInfo: true,
discountInfo: true,
paper: 'A4-L',
},
rfbuy: {
pays: true,
note: true,
noteString: '',
bidInfo: true,
taxInfo: true,
discountInfo: true,
paper: 'A4-L',
},
rfsell: {
pays: true,
note: true,
noteString: '',
bidInfo: true,
taxInfo: true,
discountInfo: true,
paper: 'A4-L',
},
repservice: {
noteString: '',
paper: 'A4-L',
},
fastsell: {
invoice: true,
cashdeskTicket: true,
pdf: true
}
data: () => ({
loading: ref(false),
tabs: 0,
plugins: [],
paperOptions: [
{ title: 'A4 افقی', value: 'A4-L' },
{ title: 'A4 عمودی', value: 'A4' },
{ title: 'A5 افقی', value: 'A5-L' },
{ title: 'A5 عمودی', value: 'A5' }
],
settings: {
sell: {
pays: true,
note: true,
noteString: '',
bidInfo: true,
taxInfo: true,
discountInfo: true,
paper: 'A4-L',
},
buy: {
pays: true,
note: true,
noteString: '',
bidInfo: true,
taxInfo: true,
discountInfo: true,
paper: 'A4-L',
},
rfbuy: {
pays: true,
note: true,
noteString: '',
bidInfo: true,
taxInfo: true,
discountInfo: true,
paper: 'A4-L',
},
rfsell: {
pays: true,
note: true,
noteString: '',
bidInfo: true,
taxInfo: true,
discountInfo: true,
paper: 'A4-L',
},
repservice: {
noteString: '',
paper: 'A4-L',
},
fastsell: {
invoice: true,
cashdeskTicket: true,
pdf: true
}
}
},
}),
methods: {
isPluginActive(plugName) {
return this.plugins[plugName] !== undefined;
@ -428,4 +330,6 @@ export default {
}
</script>
<style scoped></style>
<style scoped>
</style>