Commit 1fdda8a5 authored by 石家欣's avatar 石家欣

Merge branch 'dev' of http://rungit.jxdsy.cn:10000/xys/lumastoreapp into dev

parents b5a63fe4 56efe974
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/lumastoreapp.iml" filepath="$PROJECT_DIR$/.idea/lumastoreapp.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="a3e4d1c4-910d-4b8e-ae0a-c3b9bec9b7c3" name="Default Changelist" comment="">
<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" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<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>
<component name="ProjectId" id="1dtKpRM8nA1Xb9LfqDTnnonHd79" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<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$/../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 />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="a3e4d1c4-910d-4b8e-ae0a-c3b9bec9b7c3" name="Default Changelist" comment="" />
<created>1593239131534</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1593239131534</updated>
<workItem from="1593239132729" duration="1731000" />
<workItem from="1593241788165" duration="5953000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="2" />
</component>
<component name="WindowStateProjectService">
<state x="549" y="167" key="FileChooserDialogImpl" timestamp="1593246393877">
<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="1593246393877" />
<state x="467" y="144" width="602" height="536" key="find.popup" timestamp="1593308349337">
<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="1593308349337" />
</component>
</project>
\ No newline at end of file
...@@ -45,16 +45,16 @@ ...@@ -45,16 +45,16 @@
console.info("66344554"); console.info("66344554");
var date = new Date(); var date = new Date();
let hours = date.getHours();//当前 时间 小时 let hours = date.getHours();//当前 时间 小时
let datestime = 15000;//默认15秒 let datestime = 5000;//默认15秒
console.info(hours); console.info(hours);
if(hours==11 || hours==12 || hours==13 ){//1级别 高峰时间 // if(hours==11 || hours==12 || hours==13 ){//1级别 高峰时间
datestime = 5000;//高峰时期 5s一次 // datestime = 5000;//高峰时期 5s一次
}else if(hours==10 || hours==14){//1级别 // }else if(hours==10 || hours==14){//1级别
datestime = 8000;//高峰时期 5s一次 // datestime = 8000;//高峰时期 5s一次
} // }
else{ // else{
datestime = 15000; // datestime = 15000;
} // }
if(this.$store.state.token!=""){//判断是否 已登录 if(this.$store.state.token!=""){//判断是否 已登录
......
...@@ -354,9 +354,15 @@ ...@@ -354,9 +354,15 @@
"style" : { "style" : {
"navigationBarTitleText": "卡券发放" "navigationBarTitleText": "卡券发放"
} }
},
{
"path":"pages/Printer/AddPrinter",
"style" : {
//机型列表
"navigationBarTitleText": "添加打印机",
"navigationBarBackgroundColor":"#FFFFFF"
}
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
...@@ -384,4 +390,5 @@ ...@@ -384,4 +390,5 @@
} }
] ]
} }
} }
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;
}
<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>
...@@ -229,6 +229,17 @@ ...@@ -229,6 +229,17 @@
</navigator> </navigator>
</view> </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>
<view class="BH"></view> <view class="BH"></view>
......
static/news/coupon.png

1.15 KB | W: | H:

static/news/coupon.png

1.81 KB | W: | H:

static/news/coupon.png
static/news/coupon.png
static/news/coupon.png
static/news/coupon.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -440,3 +440,19 @@ export function storeSaveMobile(data) ...@@ -440,3 +440,19 @@ export function storeSaveMobile(data)
{ {
return request.post("user/saveMobile",data,{ noAuth : true}); 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment