Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lumastoreapp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xieyishang
lumastoreapp
Commits
86735e7f
Commit
86735e7f
authored
Jun 28, 2020
by
piwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定打印机功能
parent
d7f78265
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
300 additions
and
10 deletions
+300
-10
.idea/workspace.xml
.idea/workspace.xml
+28
-8
pages.json
pages.json
+9
-2
pages/Printer/AddPrinter.scss
pages/Printer/AddPrinter.scss
+107
-0
pages/Printer/AddPrinter.vue
pages/Printer/AddPrinter.vue
+129
-0
pages/index/index.vue
pages/index/index.vue
+11
-0
static/news/coupon.lnk
static/news/coupon.lnk
+0
-0
static/news/coupon.png
static/news/coupon.png
+0
-0
static/news/printer.png
static/news/printer.png
+0
-0
utils/api/api.js
utils/api/api.js
+16
-0
No files found.
.idea/workspace.xml
View file @
86735e7f
...
...
@@ -2,8 +2,11 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"a3e4d1c4-910d-4b8e-ae0a-c3b9bec9b7c3"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/App.vue"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/App.vue"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/utils/debug.js"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/utils/debug.js"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/pages/Printer/AddPrinter.scss"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/pages/Printer/AddPrinter.vue"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/utils/api/printer.js"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/pages/index/index.vue"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/pages/index/index.vue"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -13,6 +16,15 @@
<component
name=
"ComposerSettings"
>
<execution
/>
</component>
<component
name=
"FileTemplateManagerImpl"
>
<option
name=
"RECENT_TEMPLATES"
>
<list>
<option
value=
"HTML File"
/>
<option
value=
"SCSS File"
/>
<option
value=
"JavaScript File"
/>
</list>
</option>
</component>
<component
name=
"Git.Settings"
>
<option
name=
"RECENT_GIT_ROOT_PATH"
value=
"$PROJECT_DIR$"
/>
</component>
...
...
@@ -22,10 +34,18 @@
<option
name=
"showLibraryContents"
value=
"true"
/>
</component>
<component
name=
"PropertiesComponent"
>
<property
name=
"DefaultHtmlFileTemplate"
value=
"HTML File"
/>
<property
name=
"RunOnceActivity.OpenProjectViewOnStart"
value=
"true"
/>
<property
name=
"RunOnceActivity.ShowReadmeOnStart"
value=
"true"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$/../tp5"
/>
<property
name=
"list.type.of.created.stylesheet"
value=
"SCSS"
/>
<property
name=
"node.js.detected.package.eslint"
value=
"true"
/>
<property
name=
"node.js.detected.package.tslint"
value=
"true"
/>
<property
name=
"node.js.path.for.package.eslint"
value=
"project"
/>
<property
name=
"node.js.path.for.package.tslint"
value=
"project"
/>
<property
name=
"node.js.selected.package.eslint"
value=
"(autodetect)"
/>
<property
name=
"node.js.selected.package.tslint"
value=
"(autodetect)"
/>
</component>
<component
name=
"SvnConfiguration"
>
<configuration
/>
...
...
@@ -38,7 +58,7 @@
<option
name=
"presentableId"
value=
"Default"
/>
<updated>
1593239131534
</updated>
<workItem
from=
"1593239132729"
duration=
"1731000"
/>
<workItem
from=
"1593241788165"
duration=
"
1764
000"
/>
<workItem
from=
"1593241788165"
duration=
"
5953
000"
/>
</task>
<servers
/>
</component>
...
...
@@ -46,13 +66,13 @@
<option
name=
"version"
value=
"2"
/>
</component>
<component
name=
"WindowStateProjectService"
>
<state
x=
"549"
y=
"167"
key=
"FileChooserDialogImpl"
timestamp=
"159324
0863812
"
>
<state
x=
"549"
y=
"167"
key=
"FileChooserDialogImpl"
timestamp=
"159324
6393877
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
x=
"549"
y=
"167"
key=
"FileChooserDialogImpl/0.0.1536.824@0.0.1536.824"
timestamp=
"159324
0863812
"
/>
<state
x=
"467"
y=
"144"
width=
"602"
height=
"536"
key=
"find.popup"
timestamp=
"1593
241868941
"
>
<state
x=
"549"
y=
"167"
key=
"FileChooserDialogImpl/0.0.1536.824@0.0.1536.824"
timestamp=
"159324
6393877
"
/>
<state
x=
"467"
y=
"144"
width=
"602"
height=
"536"
key=
"find.popup"
timestamp=
"1593
308349337
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
x=
"467"
y=
"144"
width=
"602"
height=
"536"
key=
"find.popup/0.0.1536.824@0.0.1536.824"
timestamp=
"1593
241868941
"
/>
<state
x=
"467"
y=
"144"
width=
"602"
height=
"536"
key=
"find.popup/0.0.1536.824@0.0.1536.824"
timestamp=
"1593
308349337
"
/>
</component>
</project>
\ No newline at end of file
pages.json
View file @
86735e7f
...
...
@@ -354,9 +354,15 @@
"style"
:
{
"navigationBarTitleText"
:
"卡券发放"
}
},
{
"path"
:
"pages/Printer/AddPrinter"
,
"style"
:
{
//机型列表
"navigationBarTitleText"
:
"添加打印机"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
}
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
...
...
@@ -384,4 +390,5 @@
}
]
}
}
pages/Printer/AddPrinter.scss
0 → 100644
View file @
86735e7f
page
{
background
:
#fff
;
}
.cardhead
{
height
:
88upx
;
line-height
:
88upx
;
background
:rgba
(
255
,
255
,
255
,
1
)
;
position
:
relative
;
z-index
:
3
;
.tabitems
{
text-align
:
center
;
.titles
{
font-size
:
30upx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
display
:
inline-block
;
}
//选中的状态
&
.active
{
.titles
{
border-bottom
:
2px
solid
#FF6900
;
}
}
}
}
//list
.inoutlist
{
padding
:
40upx
24upx
;
border-radius
:
14upx
;
.inputitem
{
border-bottom
:
1px
solid
#CDCDCD
;
border-top
:
1px
solid
#CDCDCD
;
height
:
99upx
;
line-height
:
99upx
;
background
:rgba
(
255
,
255
,
255
,
1
)
;
//border-radius:14upx 14upx 0px 0px;
padding
:
0
20upx
;
.names
{
font-size
:
30upx
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
min-width
:
200upx
;
}
.inputs
{
height
:
99upx
;
line-height
:
99upx
;
//padding-left: 136upx;
color
:
#000000
;
font-size
:
30upx
;
}
.plclass
{
color
:
#B6B6B6
;
}
}
}
//提交的按钮
.submitbtns
{
width
:
412upx
;
height
:
80upx
;
line-height
:
80upx
;
text-align
:
center
;
background
:
#FF6900
;
border-radius
:
6upx
;
font-size
:
32upx
;
color
:rgba
(
255
,
255
,
255
,
1
)
;
position
:
fixed
;
left
:
50%
;
margin-left
:
-206upx
;
bottom
:
200upx
;
}
.wz
{
margin
:
20px
40px
;
font-size
:
15px
;
}
.switch
{
position
:
relative
;
display
:
inline-block
;
width
:
120upx
;
height
:
68upx
;
}
.box
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
36upx
;
padding
:
10upx
24upx
;
}
.del
{
width
:
137upx
;
height
:
69upx
;
line-height
:
69upx
;
background
:
#F64F15
;
color
:
#fff
;
border
:
none
;
margin
:
0
!
important
;
font-size
:
30upx
;
}
pages/Printer/AddPrinter.vue
0 → 100644
View file @
86735e7f
<
template
>
<view
class=
"CardSend yicode"
>
<view
class=
"cardhead flex ali-c "
>
<view
class=
"tabitems flex1"
:class=
"
{active:tabactive==1}" @tap="taggleTab(1)" >
<view
class=
"titles"
>
添加打印机
</view>
</view>
<view
class=
"tabitems flex1 "
:class=
"
{active:tabactive==2}" @tap="taggleTab(2)" >
<view
class=
"titles "
>
打印机列表
</view>
</view>
</view>
<!--添加打印机start-->
<view
class=
"mainboxs"
v-show=
"tabactive==1"
>
<view
class=
"inoutlist"
>
<view
class=
"inputitem flex"
>
<view
class=
"names"
>
填写编码
</view>
<input
type=
"text"
placeholder=
"打印机编码"
v-model=
"parameter.print_SN"
class=
"inputs"
>
</view>
<view
class=
"wz"
>
请查看打印机上对应的设备编码,并正确填写(不区分大小写)
</view>
</view>
<button
class=
"submitbtns flexc"
@
tap=
"addPrinter"
>
确认添加
</button>
</view>
<!--添加机列表end-->
<!--打印机列表start-->
<view
class=
"swiper-list"
v-show=
"tabactive==2"
>
<view
class=
"yfcardItem flex"
v-for=
"(item,index) in printerList"
:key=
"index"
>
<view
class=
"box"
>
<view
class=
"uni-list-cell-db"
>
<view>
打印机编号
</view>
<view
style=
"font-weight: bold;margin-top:10upx;"
>
{{
item
.
print_SN
}}
</view>
</view>
<button
class=
"del"
@
tap=
"delPrinter(item.print_SN)"
plain=
"true"
>
删除
</button>
</view>
</view>
</view>
<!--打印机列表end-->
</view>
</
template
>
<
script
>
import
uniPopup
from
'
@/components/uni-popup/uni-popup.vue
'
import
wPicker
from
"
@/components/w-picker/w-picker.vue
"
;
//时间弹窗
import
{
addPrinter
,
getPrinterList
,
closePrinter
}
from
"
@/utils/api/api.js
"
import
empty
from
"
@/components/empty/empty.vue
"
export
default
{
components
:{
uniPopup
,
wPicker
,
empty
,
},
data
()
{
return
{
tabactive
:
1
,
print_SN
:
''
,
//表单提交的参数
parameter
:{
print_SN
:
""
,
//打印机编码
},
//时间弹窗
defaultVal
:[],
printerList
:[],
isallshow
:
false
,
};
},
onLoad
(){
},
methods
:{
//添加打印机编码
async
addPrinter
(){
let
can
=
this
.
parameter
;
let
res
=
await
addPrinter
(
can
);
if
(
res
.
code
==
0
){
uni
.
showToast
({
icon
:
"
success
"
,
title
:
res
.
msg
})
//this.$api.msg(res.msg);
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
},
//获取打印机列表
async
getPrinterList
(){
uni
.
showLoading
({
title
:
'
加载中...
'
});
let
res
=
await
getPrinterList
({});
if
(
res
.
code
==
0
){
console
.
log
(
res
.
data
.
length
!=
0
)
if
(
res
.
data
.
length
!=
0
){
uni
.
hideLoading
();
}
else
{
this
.
$api
.
msg
(
"
没有更多了~
"
);
}
// this.printerList = [...this.printerList,...res.data];
this
.
printerList
=
res
.
data
;
}
},
//删除打印机
async
delPrinter
(
print_SN
){
let
can
=
print_SN
;
let
res
=
await
closePrinter
({
print_SN
});
if
(
res
.
code
==
0
){
this
.
getPrinterList
()
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
},
taggleTab
(
inde
){
this
.
tabactive
=
inde
;
},
},
watch
:{
tabactive
(
e
){
if
(
e
==
2
){
//已发卡券
this
.
page
=
0
;
this
.
cardlist
=
[];
this
.
isallshow
=
false
;
this
.
getPrinterList
();
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
@import
"./AddPrinter.scss"
</
style
>
pages/index/index.vue
View file @
86735e7f
...
...
@@ -229,6 +229,17 @@
</navigator>
</view>
<view
class=
"jiu_max "
>
<navigator
url=
"/pages/Printer/AddPrinter"
>
<view
class=
"jiu_min"
>
<view>
<image
class=
"img"
src=
"/static/news/printer.png"
mode=
""
></image>
</view>
<view>
添加打印机
</view>
</view>
</navigator>
</view>
</view>
<view
class=
"BH"
></view>
...
...
static/news/coupon.lnk
0 → 100644
View file @
86735e7f
File added
static/news/coupon.png
View replaced file @
d7f78265
View file @
86735e7f
1.15 KB
|
W:
|
H:
1.81 KB
|
W:
|
H:
2-up
Swipe
Onion skin
static/news/printer.png
0 → 100644
View file @
86735e7f
1.04 KB
utils/api/api.js
View file @
86735e7f
...
...
@@ -440,3 +440,19 @@ export function storeSaveMobile(data)
{
return
request
.
post
(
"
user/saveMobile
"
,
data
,{
noAuth
:
true
});
}
//添加打印机
export
function
addPrinter
(
data
)
{
return
request
.
post
(
"
user/shopBindingPrint
"
,
data
,{
noAuth
:
true
});
}
//获取打印机列表
export
function
getPrinterList
(
data
)
{
return
request
.
post
(
"
user/shopPrintS
"
,
data
,{
noAuth
:
true
});
}
//删除打印机
export
function
closePrinter
(
data
)
{
return
request
.
post
(
"
user/shopDelPrint
"
,
data
,{
noAuth
:
true
});
}
\ No newline at end of file
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