Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmtakeout
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李定达
fmtakeout
Commits
d54fb0d1
Commit
d54fb0d1
authored
Oct 15, 2018
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.支持2个小票打印机,添加小票双机打印可配置;2.修复打印类型错误问题
parent
41c61c8b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
6 deletions
+50
-6
takeout/base/Print/printlib.cpp
+17
-2
takeout/takeout.rc
+4
-4
takeout/view/prtsettingform.cpp
+9
-0
takeout/view/prtsettingform.ui
+20
-0
No files found.
takeout/base/Print/printlib.cpp
View file @
d54fb0d1
...
@@ -72,12 +72,25 @@ void PrintLib::_PrintLab( OrderObject* order)
...
@@ -72,12 +72,25 @@ void PrintLib::_PrintLab( OrderObject* order)
deliveryTime
=
QDateTime
::
fromTime_t
(
order
->
delivery_time
).
toString
(
"hh:mm"
);
deliveryTime
=
QDateTime
::
fromTime_t
(
order
->
delivery_time
).
toString
(
"hh:mm"
);
datetime
=
QDateTime
::
currentDateTime
().
toString
(
"MM/dd"
);
datetime
=
QDateTime
::
currentDateTime
().
toString
(
"MM/dd"
);
}
}
int
allprod
=
0
;
foreach
(
ProductObject
*
dish
,
order
->
proList
)
{
allprod
+=
dish
->
product_amount
;
}
int
index
=
0
;
int
index
=
0
;
foreach
(
ProductObject
*
dish
,
order
->
proList
)
foreach
(
ProductObject
*
dish
,
order
->
proList
)
{
{
int
num
=
dish
->
product_amount
;
while
(
num
>
0
)
{
f_TSCInit
();
f_TSCInit
();
//qDebug() << "f_TSCInit";
//qDebug() << "f_TSCInit";
QString
title
=
QString
(
"%1 %2 %3 %4/%5"
).
arg
(
QString
::
number
(
order
->
order_index
),
datetime
,
deliveryTime
,
QString
::
number
(
++
index
),
QString
::
number
(
order
->
proList
.
size
()
));
QString
title
=
QString
(
"%1 %2 %3 %4/%5"
).
arg
(
QString
::
number
(
order
->
order_index
),
datetime
,
deliveryTime
,
QString
::
number
(
++
index
),
QString
::
number
(
allprod
));
f_TSCWinPrintln
(
10
,
0
,
25
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
title
.
toLocal8Bit
().
data
(),
0
);
f_TSCWinPrintln
(
10
,
0
,
25
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
title
.
toLocal8Bit
().
data
(),
0
);
f_TSCWinPrintln
(
0
,
0
,
22
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
"-----------------------------------"
,
0.0266666
);
f_TSCWinPrintln
(
0
,
0
,
22
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
"-----------------------------------"
,
0.0266666
);
f_TSCWinPrintln
(
10
,
0
,
30
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
dish
->
name
.
f_TSCWinPrintln
(
10
,
0
,
30
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
dish
->
name
.
...
@@ -105,6 +118,8 @@ void PrintLib::_PrintLab( OrderObject* order)
...
@@ -105,6 +118,8 @@ void PrintLib::_PrintLab( OrderObject* order)
f_TSCWinPrintPage
(
"1"
,
"1"
);
f_TSCWinPrintPage
(
"1"
,
"1"
);
--
num
;
}
//qDebug() << "down f_TSCWinPrintPage";
//qDebug() << "down f_TSCWinPrintPage";
}
}
}
}
...
@@ -567,7 +582,7 @@ QString PrintLib::_OnlyGetPrintIni()
...
@@ -567,7 +582,7 @@ QString PrintLib::_OnlyGetPrintIni()
ini
.
append
(
"|"
);
ini
.
append
(
"|"
);
ini
.
append
(
config
.
value
(
"Printer/parallel"
).
toString
());
ini
.
append
(
config
.
value
(
"Printer/parallel"
).
toString
());
ini
.
append
(
"|"
);
ini
.
append
(
"|"
);
ini
.
append
(
config
.
value
(
"Printer/type"
).
toString
());
ini
.
append
(
config
.
value
(
"
Other
Printer/type"
).
toString
());
ini
.
append
(
"|"
);
ini
.
append
(
"|"
);
ini
.
append
(
config
.
value
(
"Printer/usb"
).
toString
());
ini
.
append
(
config
.
value
(
"Printer/usb"
).
toString
());
ini
.
append
(
"|"
);
ini
.
append
(
"|"
);
...
...
takeout/takeout.rc
View file @
d54fb0d1
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
#include <winver.h>
#include <winver.h>
#endif
#endif
VS_VERSION_INFO VERSIONINFO
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,
2
FILEVERSION 2,0,0,
4
PRODUCTVERSION 2,0,0,
2
PRODUCTVERSION 2,0,0,
4
FILEFLAGSMASK 0x3fL
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
FILEFLAGS VS_FF_DEBUG
...
@@ -22,12 +22,12 @@ VS_VERSION_INFO VERSIONINFO
...
@@ -22,12 +22,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
BEGIN
VALUE "CompanyName", "ShangHai Freemud Co., Ltd."
VALUE "CompanyName", "ShangHai Freemud Co., Ltd."
VALUE "FileDescription", "FREEMUD Manager System"
VALUE "FileDescription", "FREEMUD Manager System"
VALUE "FileVersion", "2.0.0.
2
"
VALUE "FileVersion", "2.0.0.
4
"
VALUE "InternalName", "FREEMUD"
VALUE "InternalName", "FREEMUD"
VALUE "LegalCopyright", "Copyright (C)2017-2020"
VALUE "LegalCopyright", "Copyright (C)2017-2020"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "fmTakeout"
VALUE "ProductName", "fmTakeout"
VALUE "ProductVersion", "2.0.0.
2
"
VALUE "ProductVersion", "2.0.0.
4
"
END
END
END
END
BLOCK "VarFileInfo"
BLOCK "VarFileInfo"
...
...
takeout/view/prtsettingform.cpp
View file @
d54fb0d1
...
@@ -322,7 +322,16 @@ void PrtSettingForm::on_pushButton_save_clicked()
...
@@ -322,7 +322,16 @@ void PrtSettingForm::on_pushButton_save_clicked()
if
(
Wigth
.
isEmpty
()
||
name
.
isEmpty
())
if
(
Wigth
.
isEmpty
()
||
name
.
isEmpty
())
return
;
return
;
QString
confilename
=
qApp
->
applicationDirPath
()
+
"/"
+
CONFIG_NAME
;
if
(
ui
->
checkBox_dbprt
->
isChecked
())
QSettings
(
confilename
,
QSettings
::
IniFormat
).
setValue
(
INI_NEEDPTR
,
1
);
else
QSettings
(
confilename
,
QSettings
::
IniFormat
).
setValue
(
INI_NEEDPTR
,
0
);
QSettings
(
filename
,
QSettings
::
IniFormat
).
setValue
(
session
+
"/"
+
"printType"
,
type
);
QSettings
(
filename
,
QSettings
::
IniFormat
).
setValue
(
session
+
"/"
+
"printType"
,
type
);
QSettings
(
filename
,
QSettings
::
IniFormat
).
setValue
(
session
+
"/"
+
"type"
,
type
);
QSettings
(
filename
,
QSettings
::
IniFormat
).
setValue
(
session
+
"/"
+
"IP"
,
Ip
);
QSettings
(
filename
,
QSettings
::
IniFormat
).
setValue
(
session
+
"/"
+
"IP"
,
Ip
);
QSettings
(
filename
,
QSettings
::
IniFormat
).
setValue
(
session
+
"/"
+
"Name"
,
name
);
QSettings
(
filename
,
QSettings
::
IniFormat
).
setValue
(
session
+
"/"
+
"Name"
,
name
);
QSettings
(
filename
,
QSettings
::
IniFormat
).
setValue
(
session
+
"/"
+
"PaperWidth"
,
Wigth
);
QSettings
(
filename
,
QSettings
::
IniFormat
).
setValue
(
session
+
"/"
+
"PaperWidth"
,
Wigth
);
...
...
takeout/view/prtsettingform.ui
View file @
d54fb0d1
...
@@ -216,6 +216,26 @@
...
@@ -216,6 +216,26 @@
</spacer>
</spacer>
</item>
</item>
<item>
<item>
<widget
class=
"QCheckBox"
name=
"checkBox_dbprt"
>
<property
name=
"text"
>
<string>
双打印机
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_24"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"radioButton_dev"
>
<widget
class=
"QRadioButton"
name=
"radioButton_dev"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
驱动打印
</string>
<string>
驱动打印
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment