收银台打印小票
This commit is contained in:
parent
3e812bd148
commit
202399cfbf
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 19 KiB |
@ -2,13 +2,17 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- <img :src="logo" alt="Logo" style="margin-left: 80px;" class="logo">-->
|
<!-- <img :src="logo" alt="Logo" style="margin-left: 80px;" class="logo">-->
|
||||||
<div class="left-img">
|
<div class="left-img">
|
||||||
<div class="top-p" style="height: 130px" >
|
<div v-if="this.form.logoSet === '0'">
|
||||||
|
<img class="logostat" :src="imagePath + this.form.logeImage" alt="">
|
||||||
|
<hr class="dashed-line">
|
||||||
|
</div>
|
||||||
|
<div class="top-p">
|
||||||
<div v-if="iflogoSet(0)" style="font-size: 16px;font-weight: bold">{{form.storeName}}</div>
|
<div v-if="iflogoSet(0)" style="font-size: 16px;font-weight: bold">{{form.storeName}}</div>
|
||||||
<div v-if="iflogoSet(1)" >{{form.title}}</div>
|
<div v-if="iflogoSet(1)" >{{form.title}}</div>
|
||||||
<div v-if="iflogoSet(2)">注:会员充值、一件加油、收银台消费</div>
|
<div v-if="iflogoSet(2)">注:会员充值、一件加油、收银台消费</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="conten-p" style="height: 150px">
|
<hr class="dashed-line">
|
||||||
|
<div class="conten-p">
|
||||||
<div v-if="ifcentent(0)" >订单编号:xf155666555</div>
|
<div v-if="ifcentent(0)" >订单编号:xf155666555</div>
|
||||||
<div v-if="ifcentent(1)">卡号:15xx858777</div>
|
<div v-if="ifcentent(1)">卡号:15xx858777</div>
|
||||||
<div v-if="ifcentent(2)">车牌号:鲁A7788</div>
|
<div v-if="ifcentent(2)">车牌号:鲁A7788</div>
|
||||||
@ -16,13 +20,15 @@
|
|||||||
<div v-if="ifcentent(4)">手机号:13583017106</div>
|
<div v-if="ifcentent(4)">手机号:13583017106</div>
|
||||||
<div v-if="ifcentent(5)">余额:999</div>
|
<div v-if="ifcentent(5)">余额:999</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="conten-p" style="height: 150px">
|
<hr class="dashed-line">
|
||||||
|
<div class="conten-p" style="height: 30px">
|
||||||
该区域为小票模板的固定排版
|
该区域为小票模板的固定排版
|
||||||
</div>
|
</div>
|
||||||
<div class="conten-p" style="height: 150px">
|
<hr class="dashed-line">
|
||||||
|
<div class="conten-p" style="height: 30px">
|
||||||
该区域为小票模板的固定排版
|
该区域为小票模板的固定排版
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<hr class="dashed-line">
|
||||||
<div class="conten-p">
|
<div class="conten-p">
|
||||||
<div v-if="ifbottoms(0)">操作时间:2019-09-09 12:00:00</div>
|
<div v-if="ifbottoms(0)">操作时间:2019-09-09 12:00:00</div>
|
||||||
<div v-if="ifbottoms(1)">联系方式:13583017776</div>
|
<div v-if="ifbottoms(1)">联系方式:13583017776</div>
|
||||||
@ -31,8 +37,13 @@
|
|||||||
<div v-if="ifbottoms(4)">地址:xx街道</div>
|
<div v-if="ifbottoms(4)">地址:xx街道</div>
|
||||||
<div v-if="ifbottoms(5)">备注:{{form.remarks}}</div>
|
<div v-if="ifbottoms(5)">备注:{{form.remarks}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<hr class="dashed-line">
|
||||||
<img v-if="this.form.logeImage" :src="imagePath + this.form.logeImage" alt="">
|
<div v-if="this.form.codeSet === '1'">
|
||||||
|
<img class="logostat" :src="imagePath + this.form.codeImage" alt="">
|
||||||
|
<hr class="dashed-line">
|
||||||
|
</div>
|
||||||
|
<div class="left-img_down">
|
||||||
|
谢谢惠顾,欢迎下次光临!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
@ -44,23 +55,6 @@
|
|||||||
<el-radio v-model="logoSet" label="1">不打印小票LOGO</el-radio>
|
<el-radio v-model="logoSet" label="1">不打印小票LOGO</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- logo -->
|
<!-- logo -->
|
||||||
<el-upload
|
|
||||||
:action="uploadAction"
|
|
||||||
list-type="picture-card"
|
|
||||||
:class="{hide:hideUpload}"
|
|
||||||
:file-list="uploadFiles"
|
|
||||||
:auto-upload="true"
|
|
||||||
:show-file-list="false"
|
|
||||||
:headers="uploadHeader"
|
|
||||||
:on-success="handleUploadSuccessCover">
|
|
||||||
<img
|
|
||||||
v-if="this.form.logeImage"
|
|
||||||
:src="imagePath + this.form.logeImage"
|
|
||||||
class="list-img"
|
|
||||||
style="width: 100%; height: auto;"
|
|
||||||
/>
|
|
||||||
<i v-if="!this.form.logeImage" class="el-icon-plus"></i>
|
|
||||||
</el-upload>
|
|
||||||
</div>
|
</div>
|
||||||
<p style="font-weight: bold;">抬头、脚注设置</p>
|
<p style="font-weight: bold;">抬头、脚注设置</p>
|
||||||
<el-checkbox-group v-model="form.headfootSets" class="vertical-checkbox-group">
|
<el-checkbox-group v-model="form.headfootSets" class="vertical-checkbox-group">
|
||||||
@ -72,7 +66,7 @@
|
|||||||
|
|
||||||
<div class="checkbox-input-container">
|
<div class="checkbox-input-container">
|
||||||
<el-checkbox :label="2">小票类型</el-checkbox>
|
<el-checkbox :label="2">小票类型</el-checkbox>
|
||||||
<span style="font-size: 10px">注:会员充值、一件加油、收银台消费</span>
|
<span style="font-size: 10px">注:会员充值、一键加油、收银台消费</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="checkbox-input-container">
|
<div class="checkbox-input-container">
|
||||||
@ -108,30 +102,62 @@
|
|||||||
<el-radio v-model="logoSet" label="1">自定义二维码</el-radio>
|
<el-radio v-model="logoSet" label="1">自定义二维码</el-radio>
|
||||||
<el-radio v-model="logoSet" label="2">不打印二维码</el-radio>
|
<el-radio v-model="logoSet" label="2">不打印二维码</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- 二维码 -->
|
<div style="width: 600px; margin-left: auto">
|
||||||
<el-upload
|
<el-input
|
||||||
:action="uploadAction"
|
v-if="this.form.codeSet==='1'"
|
||||||
list-type="picture-card"
|
v-model="form.codeContent" placeholder="请输入二维码的内容"></el-input>
|
||||||
:class="{hide:hideUpload}"
|
</div>
|
||||||
:file-list="uploadFiles"
|
|
||||||
:auto-upload="true"
|
|
||||||
:show-file-list="false"
|
|
||||||
:headers="uploadHeader"
|
|
||||||
:on-success="ermUploadSuccessCover">
|
|
||||||
<img
|
|
||||||
v-if="this.form.codeImage"
|
|
||||||
:src="imagePath + this.form.codeImage"
|
|
||||||
class="list-img"
|
|
||||||
style="width: 100%; height: auto"
|
|
||||||
/>
|
|
||||||
<i v-if="!this.form.codeImage" class="el-icon-plus"></i>
|
|
||||||
</el-upload>
|
|
||||||
</div>
|
</div>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="submitForm3('form')">保存并同步更新小票样式</el-button>
|
<el-button type="primary" @click="submitForm3('form')">保存并同步更新小票样式</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="relative">
|
||||||
|
<el-upload
|
||||||
|
:action="uploadAction"
|
||||||
|
v-if="this.form.logoSet === '0'"
|
||||||
|
list-type="picture-card"
|
||||||
|
:class="{hide:hideUpload}"
|
||||||
|
:file-list="uploadFiles"
|
||||||
|
:auto-upload="true"
|
||||||
|
:show-file-list="false"
|
||||||
|
:headers="uploadHeader"
|
||||||
|
:on-success="handleUploadSuccessCover">
|
||||||
|
<img
|
||||||
|
v-if="this.form.logeImage"
|
||||||
|
:src="imagePath + this.form.logeImage"
|
||||||
|
class="list-img"
|
||||||
|
style="width: 100%; height: auto;"
|
||||||
|
/>
|
||||||
|
<i v-if="!this.form.logeImage" class="el-icon-plus"></i>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="relative1">
|
||||||
|
<div>
|
||||||
|
样例
|
||||||
|
</div>
|
||||||
|
<!-- 二维码 -->
|
||||||
|
<el-upload
|
||||||
|
v-if="this.form.codeSet==='1'"
|
||||||
|
:action="uploadAction"
|
||||||
|
list-type="picture-card"
|
||||||
|
:class="{hide:hideUpload}"
|
||||||
|
:file-list="uploadFiles"
|
||||||
|
:auto-upload="true"
|
||||||
|
:show-file-list="false"
|
||||||
|
:headers="uploadHeader"
|
||||||
|
:on-success="ermUploadSuccessCover">
|
||||||
|
<img
|
||||||
|
v-if="this.form.codeImage"
|
||||||
|
:src="imagePath + this.form.codeImage"
|
||||||
|
class="list-img"
|
||||||
|
style="width: 100%; height: auto"
|
||||||
|
/>
|
||||||
|
<i v-if="!this.form.codeImage" class="el-icon-plus"></i>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -157,6 +183,7 @@ export default {
|
|||||||
codeImage:'',
|
codeImage:'',
|
||||||
title:'',
|
title:'',
|
||||||
foot:'',
|
foot:'',
|
||||||
|
codeContent:'',
|
||||||
},
|
},
|
||||||
form2: {
|
form2: {
|
||||||
id:'',
|
id:'',
|
||||||
@ -170,6 +197,7 @@ export default {
|
|||||||
codeImage:'',
|
codeImage:'',
|
||||||
title:'',
|
title:'',
|
||||||
foot:'',
|
foot:'',
|
||||||
|
codeContent:'',
|
||||||
},
|
},
|
||||||
logoSet: '', // 单选框的值,
|
logoSet: '', // 单选框的值,
|
||||||
ding: '',
|
ding: '',
|
||||||
@ -245,6 +273,7 @@ export default {
|
|||||||
this.form2.codeImage= this.form.codeImage
|
this.form2.codeImage= this.form.codeImage
|
||||||
this.form2.title= this.form.title
|
this.form2.title= this.form.title
|
||||||
this.form2.foot= this.form.foot
|
this.form2.foot= this.form.foot
|
||||||
|
this.form2.codeContent= this.form.codeContent
|
||||||
return this.form2;
|
return this.form2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -253,6 +282,8 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.left-img{
|
.left-img{
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 830px;
|
height: 830px;
|
||||||
background: url("../../assets/images/xpiao.png") no-repeat;
|
background: url("../../assets/images/xpiao.png") no-repeat;
|
||||||
@ -311,16 +342,14 @@ export default {
|
|||||||
.top-p{
|
.top-p{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding-top: 10px;
|
||||||
padding-top: 30px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.conten-p{
|
.conten-p{
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
@ -397,7 +426,37 @@ avatar-uploader .el-upload {
|
|||||||
.el-form-item {
|
.el-form-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 20px;
|
margin-top: 70px;
|
||||||
|
}
|
||||||
|
.relative {
|
||||||
|
position: relative;
|
||||||
|
left: 20px; /* 向左偏移20像素 */
|
||||||
|
top: 10px; /* 向上偏移10像素 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.relative1 {
|
||||||
|
position: relative;
|
||||||
|
left: -130px; /* 向左偏移20像素 */
|
||||||
|
top: 600px; /* 向上偏移10像素 */
|
||||||
|
}
|
||||||
|
.logostat{
|
||||||
|
filter: grayscale(100%);
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
margin-left: 30%;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.dashed-line {
|
||||||
|
border-top: 1px dashed #f2f2f2; /* 虚线的颜色和宽度 */
|
||||||
|
width: 92%; /* 虚线的长度 */
|
||||||
|
margin:11px 10px 0; /* 上下外边距 */
|
||||||
|
clear: both; /* 清除浮动,如果有的话 */
|
||||||
|
}
|
||||||
|
.left-img_down{
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-left: 5%;
|
||||||
|
width: 90%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
order_number, member_card, plate_number, membership_level, phone_number,
|
order_number, member_card, plate_number, membership_level, phone_number,
|
||||||
member_points, bottom_set, operate_time,
|
member_points, bottom_set, operate_time,
|
||||||
contact_way, console_operator, address, remarks, code_set, code_image,
|
contact_way, console_operator, address, remarks, code_set, code_image,
|
||||||
loge_image,store_id,create_name,create_time,create_by,update_time,update_by,print_template_top,print_template_down)
|
loge_image,store_id,create_name,create_time,create_by,update_time,update_by,print_template_top,print_template_down,code_content)
|
||||||
VALUES (#{receiptPrinting.logoSet}, #{receiptPrinting.headfootSet}, #{receiptPrinting.shopName}, #{receiptPrinting.title},
|
VALUES (#{receiptPrinting.logoSet}, #{receiptPrinting.headfootSet}, #{receiptPrinting.shopName}, #{receiptPrinting.title},
|
||||||
#{receiptPrinting.receiptType}, #{receiptPrinting.foot}, #{receiptPrinting.topSet},
|
#{receiptPrinting.receiptType}, #{receiptPrinting.foot}, #{receiptPrinting.topSet},
|
||||||
#{receiptPrinting.orderNumber}, #{receiptPrinting.memberCard}, #{receiptPrinting.plateNumber},
|
#{receiptPrinting.orderNumber}, #{receiptPrinting.memberCard}, #{receiptPrinting.plateNumber},
|
||||||
@ -26,7 +26,7 @@
|
|||||||
#{receiptPrinting.contactWay}, #{receiptPrinting.consoleOperator}, #{receiptPrinting.address},
|
#{receiptPrinting.contactWay}, #{receiptPrinting.consoleOperator}, #{receiptPrinting.address},
|
||||||
#{receiptPrinting.remarks}, #{receiptPrinting.codeSet}, #{receiptPrinting.codeImage}, #{receiptPrinting.logeImage}
|
#{receiptPrinting.remarks}, #{receiptPrinting.codeSet}, #{receiptPrinting.codeImage}, #{receiptPrinting.logeImage}
|
||||||
, #{receiptPrinting.storeId}, #{receiptPrinting.createName}, #{receiptPrinting.createTime}, #{receiptPrinting.createBy}
|
, #{receiptPrinting.storeId}, #{receiptPrinting.createName}, #{receiptPrinting.createTime}, #{receiptPrinting.createBy}
|
||||||
, #{receiptPrinting.updateTime}, #{receiptPrinting.updateBy}, #{receiptPrinting.printTemplateTop}, #{receiptPrinting.printTemplateDown})
|
, #{receiptPrinting.updateTime}, #{receiptPrinting.updateBy}, #{receiptPrinting.printTemplateTop}, #{receiptPrinting.printTemplateDown},#{receiptPrinting.codeContent})
|
||||||
ON DUPLICATE KEY UPDATE
|
ON DUPLICATE KEY UPDATE
|
||||||
logo_set = #{receiptPrinting.logoSet}, headfoot_set = #{receiptPrinting.headfootSet}, shop_name = #{receiptPrinting.shopName},
|
logo_set = #{receiptPrinting.logoSet}, headfoot_set = #{receiptPrinting.headfootSet}, shop_name = #{receiptPrinting.shopName},
|
||||||
title = #{receiptPrinting.title}, receipt_type = #{receiptPrinting.receiptType}, foot = #{receiptPrinting.foot},
|
title = #{receiptPrinting.title}, receipt_type = #{receiptPrinting.receiptType}, foot = #{receiptPrinting.foot},
|
||||||
@ -38,6 +38,7 @@
|
|||||||
address = #{receiptPrinting.address}, remarks = #{receiptPrinting.remarks}, code_set = #{receiptPrinting.codeSet},
|
address = #{receiptPrinting.address}, remarks = #{receiptPrinting.remarks}, code_set = #{receiptPrinting.codeSet},
|
||||||
code_image = #{receiptPrinting.codeImage},loge_image = #{receiptPrinting.logeImage},update_time = #{receiptPrinting.updateTime},
|
code_image = #{receiptPrinting.codeImage},loge_image = #{receiptPrinting.logeImage},update_time = #{receiptPrinting.updateTime},
|
||||||
update_by = #{receiptPrinting.updateBy},print_template_top= #{receiptPrinting.printTemplateTop},print_template_down= #{receiptPrinting.printTemplateDown}
|
update_by = #{receiptPrinting.updateBy},print_template_top= #{receiptPrinting.printTemplateTop},print_template_down= #{receiptPrinting.printTemplateDown}
|
||||||
|
,code_content=#{receiptPrinting.codeContent}
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
<select id="queryReceiptPrintingOne" resultType="com.fuint.business.setting.entity.ReceiptPrinting">
|
<select id="queryReceiptPrintingOne" resultType="com.fuint.business.setting.entity.ReceiptPrinting">
|
||||||
|
@ -24,6 +24,8 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -182,7 +184,7 @@ public class ReceiptPrintingServiceImpl extends ServiceImpl<ReceiptPrintingMappe
|
|||||||
}
|
}
|
||||||
if(receiptPrinting.getCodeSet().equals("1")){
|
if(receiptPrinting.getCodeSet().equals("1")){
|
||||||
// sb1.append("<QR>"+receiptPrinting.getCodeContent()+"</QR>\r\n");
|
// sb1.append("<QR>"+receiptPrinting.getCodeContent()+"</QR>\r\n");
|
||||||
sb1.append("<QR>www.baidu.com</QR>\r\n");
|
sb1.append("<QR>"+receiptPrinting.getCodeContent()+"</QR>\r\n");
|
||||||
}
|
}
|
||||||
sb1.append("----------------------------\r\n");
|
sb1.append("----------------------------\r\n");
|
||||||
sb1.append("<center>谢谢惠顾,欢迎下次光临!</center>\r\n");
|
sb1.append("<center>谢谢惠顾,欢迎下次光临!</center>\r\n");
|
||||||
@ -253,6 +255,14 @@ public class ReceiptPrintingServiceImpl extends ServiceImpl<ReceiptPrintingMappe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
m.init(infoByStoreId.get(i).getAppKey(), infoByStoreId.get(i).getAppSecret());
|
m.init(infoByStoreId.get(i).getAppKey(), infoByStoreId.get(i).getAppSecret());
|
||||||
|
InetAddress inetAddress = null;
|
||||||
|
try {
|
||||||
|
inetAddress = InetAddress.getLocalHost();
|
||||||
|
} catch (UnknownHostException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
String ipAddress = inetAddress.getHostAddress();
|
||||||
|
System.out.println(ipAddress);
|
||||||
System.out.println("http://192.168.31.54:81/dev-api/static/uploadImages/20241021/1be3cfc573d043d6b6eb42eac97e05a5.jpg");
|
System.out.println("http://192.168.31.54:81/dev-api/static/uploadImages/20241021/1be3cfc573d043d6b6eb42eac97e05a5.jpg");
|
||||||
String url=m.setIcon(infoByStoreId.get(i).getMachineCode(), "https://www.baidu.com/img/flexible/logo/pc/result.png");
|
String url=m.setIcon(infoByStoreId.get(i).getMachineCode(), "https://www.baidu.com/img/flexible/logo/pc/result.png");
|
||||||
if (ObjectUtil.isNotEmpty(url)) {
|
if (ObjectUtil.isNotEmpty(url)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user