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
ac5852fd
Commit
ac5852fd
authored
Oct 24, 2018
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.添加纸张宽度可选;2.丰富测试纸打印内容
parent
ee7155a1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
15 deletions
+65
-15
takeout/control/orderprintwork.cpp
+12
-5
takeout/takeout.rc
+4
-4
takeout/view/prtsettingform.cpp
+13
-5
takeout/view/prtsettingform.h
+1
-1
takeout/view/prtsettingform.ui
+35
-0
No files found.
takeout/control/orderprintwork.cpp
View file @
ac5852fd
...
@@ -58,21 +58,21 @@ bool orderprintwork::event(QEvent *e)
...
@@ -58,21 +58,21 @@ bool orderprintwork::event(QEvent *e)
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
{
{
if
(
prtwi
=
=
56
)
if
(
prtwi
<
=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTTAKE_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTTAKE_TEMPLET
);
else
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTTAKE80_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTTAKE80_TEMPLET
);
}
}
else
if
(
order
.
order_type
==
6
)
else
if
(
order
.
order_type
==
6
)
{
{
if
(
prtwi
=
=
56
)
if
(
prtwi
<
=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTYY_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTYY_TEMPLET
);
else
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTYY80_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTYY80_TEMPLET
);
}
}
else
else
{
{
if
(
prtwi
=
=
56
)
if
(
prtwi
<
=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT_TEMPLET
);
else
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
...
@@ -166,14 +166,21 @@ bool orderprintwork::event(QEvent *e)
...
@@ -166,14 +166,21 @@ bool orderprintwork::event(QEvent *e)
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
if
(
order
.
order_type
==
1
||
order
.
order_type
==
2
)
{
{
if
(
othprtw
=
=
56
)
if
(
othprtw
<
=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTTAKE_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTTAKE_TEMPLET
);
else
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTTAKE80_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTTAKE80_TEMPLET
);
}
}
else
if
(
order
.
order_type
==
6
)
{
if
(
othprtw
<=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTYY_TEMPLET
);
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINTYY80_TEMPLET
);
}
else
else
{
{
if
(
othprtw
=
=
56
)
if
(
othprtw
<
=
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT_TEMPLET
);
else
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
...
...
takeout/takeout.rc
View file @
ac5852fd
...
@@ -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,
8
FILEVERSION 2,0,0,
9
PRODUCTVERSION 2,0,0,
8
PRODUCTVERSION 2,0,0,
9
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.
8
"
VALUE "FileVersion", "2.0.0.
9
"
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.
8
"
VALUE "ProductVersion", "2.0.0.
9
"
END
END
END
END
BLOCK "VarFileInfo"
BLOCK "VarFileInfo"
...
...
takeout/view/prtsettingform.cpp
View file @
ac5852fd
...
@@ -35,7 +35,7 @@ PrtSettingForm::PrtSettingForm(QWidget *parent) :
...
@@ -35,7 +35,7 @@ PrtSettingForm::PrtSettingForm(QWidget *parent) :
* labe_high 标签纸高
* labe_high 标签纸高
* label_type 标签打印类型
* label_type 标签打印类型
****************/
****************/
void
PrtSettingForm
::
GetData
(
char
*
data
,
QString
type
,
QString
lptname
,
QString
usbname
,
QString
ip
,
QString
name
,
QString
label_name
,
QString
label_wigth
,
QString
labe_high
,
QString
label_type
)
void
PrtSettingForm
::
GetData
(
char
*
data
,
QString
type
,
QString
lptname
,
QString
usbname
,
QString
ip
,
QString
name
,
QString
label_name
,
QString
label_wigth
,
QString
labe_high
,
QString
label_type
,
QString
prtwit
)
{
{
std
::
string
ini
;
std
::
string
ini
;
//ini.append(config.value("Printer/Name").toString());
//ini.append(config.value("Printer/Name").toString());
...
@@ -57,7 +57,11 @@ void PrtSettingForm::GetData(char *data, QString type, QString lptname, QString
...
@@ -57,7 +57,11 @@ void PrtSettingForm::GetData(char *data, QString type, QString lptname, QString
ini
.
append
(
"|"
);
ini
.
append
(
"|"
);
//ini.append(config.value("Printer/PaperWidth").toString());
//ini.append(config.value("Printer/PaperWidth").toString());
ini
.
append
(
"40"
);
if
(
!
prtwit
.
isEmpty
())
ini
.
append
(
prtwit
.
toUtf8
().
data
());
else
ini
.
append
(
"80"
);
//ini.append("40");
ini
.
append
(
"|"
);
ini
.
append
(
"|"
);
//ini.append(config.value("Printer/levlel").toString());
//ini.append(config.value("Printer/levlel").toString());
ini
.
append
(
"All"
);
ini
.
append
(
"All"
);
...
@@ -186,7 +190,7 @@ void PrtSettingForm::on_pushButton_test_clicked()
...
@@ -186,7 +190,7 @@ void PrtSettingForm::on_pushButton_test_clicked()
QFile
file
;
QFile
file
;
if
(
QString
(
"80"
).
compare
(
ui
->
comboBox_width
->
currentText
())
==
0
)
if
(
ui
->
comboBox_width
->
currentText
().
toInt
()
>
56
)
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT80_TEMPLET
);
else
else
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT_TEMPLET
);
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
FILE_PRINT_TEMPLET
);
...
@@ -208,6 +212,10 @@ void PrtSettingForm::on_pushButton_test_clicked()
...
@@ -208,6 +212,10 @@ void PrtSettingForm::on_pushButton_test_clicked()
OrderObject
order
;
OrderObject
order
;
order
.
store_name
=
QString
(
"
\xE9\x9D\x9E\xE7\xA0\x81\xE4\xB8\x8A\xE6\xB5\xB7\xE5\xB8\x82\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE6\xB5\x8B\xE8\xAF\x95\xE5\xBA\x97
"
);
order
.
order_index
=
999
;
order
.
code
=
"123456789"
;
char
arr
[
2048
]
=
{
0
};
char
arr
[
2048
]
=
{
0
};
QString
type
=
"4"
;
QString
type
=
"4"
;
...
@@ -249,7 +257,7 @@ void PrtSettingForm::on_pushButton_test_clicked()
...
@@ -249,7 +257,7 @@ void PrtSettingForm::on_pushButton_test_clicked()
QLOG_INFO
()
<<
type
;
QLOG_INFO
()
<<
type
;
GetData
(
arr
,
type
,
ui
->
lineEdit_lpt
->
text
(),
ui
->
lineEdit_usb
->
text
(),
ui
->
lineEdit_ip
->
text
(),
name
,
ui
->
lineEdit_lab_name
->
text
(),
ui
->
lineEdit_lab_widgh
->
text
(),
GetData
(
arr
,
type
,
ui
->
lineEdit_lpt
->
text
(),
ui
->
lineEdit_usb
->
text
(),
ui
->
lineEdit_ip
->
text
(),
name
,
ui
->
lineEdit_lab_name
->
text
(),
ui
->
lineEdit_lab_widgh
->
text
(),
ui
->
lineEdit_lab_high
->
text
(),
labtype
);
ui
->
lineEdit_lab_high
->
text
(),
labtype
,
ui
->
comboBox_width
->
currentText
()
);
QLOG_INFO
()
<<
"prt info"
<<
arr
;
QLOG_INFO
()
<<
"prt info"
<<
arr
;
...
@@ -302,7 +310,7 @@ void PrtSettingForm::on_btn_lab_test_clicked()
...
@@ -302,7 +310,7 @@ void PrtSettingForm::on_btn_lab_test_clicked()
GetData
(
arr
,
type
,
ui
->
lineEdit_lpt
->
text
(),
ui
->
lineEdit_usb
->
text
(),
ui
->
lineEdit_ip
->
text
(),
name
,
labelname
,
ui
->
lineEdit_lab_widgh
->
text
(),
GetData
(
arr
,
type
,
ui
->
lineEdit_lpt
->
text
(),
ui
->
lineEdit_usb
->
text
(),
ui
->
lineEdit_ip
->
text
(),
name
,
labelname
,
ui
->
lineEdit_lab_widgh
->
text
(),
ui
->
lineEdit_lab_high
->
text
(),
labtype
);
ui
->
lineEdit_lab_high
->
text
(),
labtype
,
ui
->
comboBox_width
->
currentText
()
);
QLOG_INFO
()
<<
"prt info"
<<
arr
;
QLOG_INFO
()
<<
"prt info"
<<
arr
;
...
...
takeout/view/prtsettingform.h
View file @
ac5852fd
...
@@ -14,7 +14,7 @@ class PrtSettingForm : public QDialog
...
@@ -14,7 +14,7 @@ class PrtSettingForm : public QDialog
public
:
public
:
explicit
PrtSettingForm
(
QWidget
*
parent
=
0
);
explicit
PrtSettingForm
(
QWidget
*
parent
=
0
);
~
PrtSettingForm
();
~
PrtSettingForm
();
void
GetData
(
char
*
data
,
QString
type
,
QString
lptname
,
QString
usbname
,
QString
ip
,
QString
name
,
QString
label_name
,
QString
label_wigth
,
QString
labe_high
,
QString
label_type
);
void
GetData
(
char
*
data
,
QString
type
,
QString
lptname
,
QString
usbname
,
QString
ip
,
QString
name
,
QString
label_name
,
QString
label_wigth
,
QString
labe_high
,
QString
label_type
,
QString
prtwit
=
""
);
private
slots
:
private
slots
:
void
on_pushButton_test_clicked
();
void
on_pushButton_test_clicked
();
...
...
takeout/view/prtsettingform.ui
View file @
ac5852fd
...
@@ -776,9 +776,44 @@
...
@@ -776,9 +776,44 @@
</item>
</item>
<item>
<item>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
75
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
70
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
68
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
65
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
60
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
56
</string>
<string>
56
</string>
</property>
</property>
</item>
</item>
<item>
<property
name=
"text"
>
<string>
50
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
45
</string>
</property>
</item>
</widget>
</widget>
</item>
</item>
</layout>
</layout>
...
...
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