Commit 33f49487 by liangjianmin

优化打印机

parent 8aa09097
@font-face {
font-family: "iconfont";
src: url('~@/static/iconfont.ttf?t=1597739255175') format('truetype');
font-family: "iconfont";
src: url('~@/static/iconfont.ttf?t=1597739255175') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-Chevron1:before {
content: "\e769";
}
.icon-jinggao1:before {
content: "\e780";
content: "\e780";
}
.icon-a-juxing12:before {
content: "\e77f";
content: "\e77f";
}
.icon-juxing7:before {
content: "\e77d";
content: "\e77d";
}
.icon-sanjiaoxing2:before {
content: "\e77e";
content: "\e77e";
}
.icon-bianzu:before {
content: "\e77b";
content: "\e77b";
}
.icon-a-Fill3:before {
content: "\e77c";
content: "\e77c";
}
.icon-xingzhuangjiehe:before {
content: "\e74f";
content: "\e74f";
}
.icon-juxing6:before {
content: "\e77a";
content: "\e77a";
}
.icon-sanjiaoxing:before {
content: "\e779";
content: "\e779";
}
.icon-sanjiaoxing1:before {
content: "\e763";
content: "\e763";
}
.icon-a-riqi11:before {
content: "\e758";
content: "\e758";
}
.icon-jinggao2:before {
content: "\e75d";
content: "\e75d";
}
.icon-juxing5:before {
content: "\e778";
content: "\e778";
}
.icon-a-10cangkucangchu:before {
content: "\e774";
content: "\e774";
}
.icon-juxing4:before {
content: "\e777";
content: "\e777";
}
.icon-jinggao:before {
content: "\e772";
content: "\e772";
}
.icon-juxing3:before {
content: "\e773";
content: "\e773";
}
.icon-a-juxing4:before {
content: "\e775";
content: "\e775";
}
.icon-a-juxing11:before {
content: "\e776";
content: "\e776";
}
.icon-shanchu:before {
content: "\e8b6";
content: "\e8b6";
}
.icon-riqi:before {
content: "\e770";
content: "\e770";
}
.icon-a-riqi1:before {
content: "\e771";
content: "\e771";
}
.icon-juxing2:before {
content: "\e76f";
content: "\e76f";
}
.icon-juxing1:before {
content: "\e76e";
content: "\e76e";
}
.icon-juxing:before {
content: "\e76b";
content: "\e76b";
}
.icon-a-juxing1:before {
content: "\e76d";
content: "\e76d";
}
.barCode {
padding-top: 100rpx;
.fix {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 10;
}
.search-box {
width: 100%;
background: #ffffff;
border-top: 1rpx solid #cad9e0;
.search-input {
position: relative;
height: 100rpx;
padding-left: 72rpx;
padding-right: 24rpx;
.icon-a-riqi11 {
position: absolute;
top: 32rpx;
left: 24rpx;
font-size: 36rpx;
color: #6e767a;
}
.uni-input {
font-size: 26rpx;
color: #404547;
width: 480rpx;
}
.scan {
font-size: 52rpx;
color: #197adb;
}
}
}
.list {
margin-top: 26rpx;
padding: 0 24rpx;
.box {
position: relative;
padding: 0 0 0 16rpx;
margin-bottom: 16rpx;
background: #ffffff;
border-radius: 4rpx;
height: 118rpx;
.title {
width: 91rpx;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 22rpx;
color: #ffffff;
}
.text {
margin-left: 16rpx;
.lh {
line-height: 40rpx;
}
.p1 {
font-size: 28rpx;
color: #1e2021;
max-width: 429rpx;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
line-height: 40rpx;
margin-right: 18rpx;
}
.p2 {
font-size: 22rpx;
color: #6e767a;
margin-right: 16rpx;
}
.p3 {
font-size: 22rpx;
color: #404547;
}
.mr64 {
margin-right: 64rpx;
}
}
.btn {
width: 91rpx;
height: 88rpx;
background: #ff3b30;
border-radius: 4rpx;
font-size: 22rpx;
color: #ffffff;
&.disable {
background: #666666;
}
}
}
}
}
.rePackage {
margin-top: 24rpx;
.refresh {
padding: 0 24rpx;
justify-content: flex-end;
.icon-a-juxing12 {
font-size: 36rpx;
color: #404547;
&.curr {
animation: spin 1s infinite linear;
}
}
.t1 {
font-size: 22rpx;
color: #404547;
margin-left: 8rpx;
}
}
.uni-list-cell {
padding: 0 24rpx;
height: 73rpx;
.uni-list-cell-left {
font-size: 28rpx;
color: #6e767a;
}
.uni-input {
font-size: 28rpx;
color: #404547;
}
.iconfont {
font-size: 28rpx;
color: #6e767a;
padding-left: 5rpx;
}
}
.uni-table {
padding: 0 24rpx;
.uni-th {
height: 62rpx;
background: #f1f4f6;
border-top: 1px solid #cad9e0;
border-bottom: 1px solid #cad9e0;
text {
flex: 0 0 25%;
font-size: 22rpx;
color: #404547;
border-right: 1px solid #cad9e0;
&:last-child {
border-right: none;
}
}
}
.uni-tr {
height: 100%;
border-bottom: 1px solid #cad9e0;
text {
flex: 0 0 25%;
font-size: 22rpx;
color: #6e767a;
border-right: 1px solid #cad9e0;
padding: 8rpx 0;
&:last-child {
border-right: none;
}
&.color {
color: #0079fe;
}
}
}
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
......@@ -70,12 +70,12 @@
"style": {
"navigationBarTitleText": "理货列表"
}
},{
}, {
"path": "pages/goods/tallyExectionDetail",
"style": {
"navigationBarTitleText": "理货作业"
}
},{
}, {
"path": "pages/goods/tallyDetail",
"style": {
"navigationBarTitleText": "理货作业"
......@@ -85,16 +85,26 @@
"style": {
"navigationBarTitleText": "异常理货问客"
}
},{
}, {
"path": "pages/tag/deviceList",
"style": {
"navigationBarTitleText": "连接设备"
}
},{
}, {
"path": "pages/mine/login",
"style": {
"navigationBarTitleText": "登录"
}
}, {
"path": "pages/goods/barCode",
"style": {
"navigationBarTitleText": "条码管理列表"
}
}, {
"path": "pages/goods/rePackageList",
"style": {
"navigationBarTitleText": "装箱复核时序蒲"
}
}],
"globalStyle": {
"navigationBarTextStyle": "black",
......
<template>
<view class="barCode">
<view class="fix">
<view class="search-box">
<view class="search-input row bothSide verCenter">
<text class="iconfont icon-a-riqi11"></text>
<input type="text" @input="inputChange()" placeholder="请手动输入入仓号或扫描" class="uni-input" v-model="erp_order_sn" placeholder-style="color:#6e767a" />
<text class="scan iconfont icon-juxing6" @click="scanChange()"></text>
</view>
</view>
</view>
<view class="list" v-if="total > 0">
<view class="box row verCenter bothSide" hover-class="none" v-for="(item, index) in erpOrderSnCodeManage" :key="index">
<view class="row verCenter">
<view class="title column rowCenter verCenter">
<text>{{ item.sum }}</text>
<text></text>
</view>
<view class="text column">
<view class="row verCenter">
<text class="p1">{{ item.erp_order_sn }}</text>
<text class="p2">{{ item.print_type_cn }}:</text>
<text class="p3">{{ item.start_box_code }}~{{ item.end_box_code }}</text>
</view>
<view class="lh row verCenter">
<text class="p2">打印:</text>
<text class="p3 mr64">{{ item.create_time_cn }}</text>
<text class="p2">补打:</text>
<text class="p3">{{ item.is_repair_print }}</text>
</view>
</view>
</view>
<view class="btn row rowCenter verCenter" @click="delErpOrderSnCodeManage(item.erp_order_sn)">作废</view>
</view>
</view>
<template v-else>
<view class="no-data column verCenter rowCenter">
<text class="iconfont icon-jinggao2"></text>
<text class="text">查找不到相关信息</text>
<text class="p">1、请输入正确的入仓号</text>
</view>
</template>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {
erpOrderSnCodeManage: [],
erp_order_sn: '',
total: 1,
page: 1,
limit: 10,
is_loading: false,
loading: false
};
},
onReachBottom() {
if (this.is_loading) return;
this.page++;
this.loading = true;
this.getData();
},
onShow() {
this.getData();
},
methods: {
inputChange() {
this.total = 0;
this.page = 1;
this.erpOrderSnCodeManage = [];
this.getData();
},
scanChange() {
uni.scanCode({
success: res => {
if (res.errMsg == 'scanCode:ok') {
this.erp_order_sn = res.result;
}
},
fail: function(res) {
uni.showToast({
title: '扫码失败',
icon: 'error'
});
}
});
},
delErpOrderSnCodeManage(erp_order_sn) {
uni.showModal({
title: '提示',
content: '您确定作废嘛?',
success: res => {
if (res.confirm) {
this.request(API.delErpOrderSnCodeManage, 'POST', { erp_order_sn: erp_order_sn }, true).then(res => {
if (res.err_code === 0) {
this.getData();
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
getData() {
this.request(API.erpOrderSnCodeManage, 'POST', { page: this.page, limit: this.limit, erp_order_sn: this.erp_order_sn }, this.loading).then(res => {
if (res.err_code === 0) {
if (res.data.data.length > 0) {
this.is_loading = false;
this.erpOrderSnCodeManage = this.erpOrderSnCodeManage.concat(res.data.data);
this.total = res.data.total;
} else {
this.is_loading = true;
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/goods/barCode.scss';
</style>
<template>
<view class="rePackage">
<view class="row verCenter refresh" @click="refresh()">
<text class="iconfont icon-a-juxing12" :class="{ curr: refreshTransition }"></text>
<text class="t1">刷新</text>
</view>
<view class="uni-list-cell row verCenter bothSide">
<view class="uni-list-cell-left">日期选择</view>
<view class="uni-list-cell-db row">
<picker mode="date" :value="today" :start="startDate" :end="endDate" @change="bindDateChange">
<text class="uni-input">{{ today }}</text>
<text class="iconfont icon-Chevron1"></text>
</picker>
</view>
</view>
<view class="uni-table">
<view class="uni-th row">
<text class="row verCenter rowCenter">卡板号</text>
<text class="row verCenter rowCenter">合计货物箱数</text>
<text class="row verCenter rowCenter">扫描状态</text>
<text class="row verCenter rowCenter">装载状态</text>
</view>
<template v-if="total > 0">
<view class="uni-tr row verCenter" v-for="(item, index) in rePackageList" :key="index">
<text class="row verCenter rowCenter color">{{ item.tray_name }}</text>
<text class="row verCenter rowCenter" :class="{ color: item.scan_status_cn == '全部已经扫描' }">{{ item.have_load_box_num }}</text>
<text class="row verCenter rowCenter" :class="{ color: item.scan_status_cn != '全部已经扫描' }">{{ item.scan_status_cn }}</text>
<text class="row verCenter rowCenter">{{ item.audit_status_cn || '' }}</text>
</view>
</template>
<template v-else>
<view class="uni-tr row verCenter"><text class="row verCenter rowCenter" style="flex:0 0 100%">暂无数据</text></view>
</template>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
const currentDate = this.getDate({
format: true
});
return {
today: currentDate,
total: 1,
page: 1,
limit: 1000,
is_loading: false,
loading: false,
rePackageList: [],
refreshTransition: false
};
},
computed: {
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
}
},
onReachBottom() {
if (this.is_loading) return;
this.page++;
this.loading = true;
this.getData();
},
onShow() {
this.getData();
},
methods: {
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
bindDateChange(e) {
this.today = e.detail.value;
this.total = 0;
this.page = 1;
this.rePackageList = [];
this.getData();
},
refresh() {
//刷新图标交互
this.refreshTransition = true;
this.loading = true;
setTimeout(() => {
this.refreshTransition = false;
}, 3000);
this.total = 0;
this.page = 1;
this.rePackageList = [];
this.getData();
},
getData() {
this.request(API.rePackageList, 'POST', { page: this.page, limit: this.limit, today: this.today }, this.loading).then(res => {
if (res.err_code === 0) {
if (res.data.data.length > 0) {
this.is_loading = false;
this.rePackageList = this.rePackageList.concat(res.data.data);
this.total = res.data.total;
} else {
this.is_loading = true;
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/goods/rePackageList.scss';
</style>
......@@ -100,6 +100,16 @@ export default {
name: '补打标签',
iconfont: 'icon-a-juxing4',
tips: ''
},
{
name: '条码管理',
iconfont: 'icon-a-juxing4',
tips: ''
},
{
name: '装箱复核序蒲',
iconfont: 'icon-a-juxing4',
tips: ''
}
]
};
......@@ -169,6 +179,14 @@ export default {
uni.navigateTo({
url: '/pages/goods/addExectionReceiving'
});
} else if (item.name == '条码管理') {
uni.navigateTo({
url: '/pages/goods/barCode'
});
} else if (item.name == '装箱复核序蒲') {
uni.navigateTo({
url: '/pages/goods/rePackageList'
});
} else {
uni.showModal({
title: '提示',
......
......@@ -65,6 +65,7 @@ export default {
printLabelData: [],
print_text: '总箱数',
platform: '',
wstyptll_id: '',
form: {
erp_order_sn_pre: '',
print_type: 1,
......@@ -183,6 +184,7 @@ export default {
this.request(API.printLabel, 'POST', this.form, false).then(res => {
if (res.err_code === 0) {
this.printLabelData = res.data;
this.wstyptll_id = res.data[0].wstyptll_id;
this.sendDataChange(); //发送数据
} else {
uni.showModal({
......@@ -219,7 +221,7 @@ export default {
data.push('T 8 0 10 220 仓库代码:' + this.printLabelData[this.print_number].warehouse_code + '\r\n');
data.push('T 8 0 10 260 流水号:' + this.printLabelData[this.print_number].wstyptll_id_sn + '\r\n');
data.push('B QR 280 110 M 2 U 8\r\n');
data.push('MA,' + this.printLabelData[this.print_number]['erp_order_sn'] + '|\r\n');
data.push('MA,' + this.printLabelData[this.print_number]['box_code'] + '|\r\n');
data.push('ENDQR\r\n');
data.push('FORM\r\n');
data.push('PRINT\r\n');
......@@ -267,15 +269,24 @@ export default {
success: res => {
this.writeBLECharacteristicValue(++times);
},
fail() {
fail: res => {
uni.hideLoading();
uni.showModal({
title: '提示',
content: '打印失败,请检查打印机',
content: '打印失败,请重新进入打印页面',
showCancel: false,
confirmText: '关闭',
success: function(res) {
success: res => {
if (res.confirm) {
this.characteristics = ''; //连接蓝牙信息清空
this.deviceId = ''; //连接蓝牙信息清空
this.device_name = ''; //连接蓝牙信息清空
this.print_number = 0; //打印计数归零
this.printLabelData = []; //打印数据清空
this.sendData64 = ''; //发送蓝牙数据清空
this.delErpOrderSnCodeManage(); //及时作废
} else if (res.cancel) {
console.log('用户点击取消');
}
......@@ -290,10 +301,10 @@ export default {
this.sendDataChange();
} else {
uni.hideLoading();
//清空数据
this.print_number = 0;
this.printLabelData = [];
this.sendData64 = '';
//重置
this.print_number = 0; //打印计数归零
this.printLabelData = []; //打印数据清空
this.sendData64 = ''; //发送蓝牙数据清空
uni.showModal({
title: '提示',
content: '打印成功,请查看标签打印机',
......@@ -310,6 +321,19 @@ export default {
}
}
},
delErpOrderSnCodeManage() {
this.request(API.delWstyptllIdErpOrderSnCodeManage, 'POST', { wstyptll_id: this.wstyptll_id }, true).then(res => {
if (res.err_code === 0) {
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false,
confirmText: '关闭'
});
}
});
},
change(index, type) {
if (type == 'erp_order_sn_pre') {
//订单类型
......
......@@ -56,6 +56,7 @@ export default {
printLabelData: [],
print_text: '总箱数',
print_type: 1,
wstyptll_id: '',
form: {
erp_order_sn_pre: '',
erp_order_sn_number: '',
......@@ -172,6 +173,7 @@ export default {
this.request(API.getPrintLabel, 'POST', { erp_order_sn: this.form.erp_order_sn_pre + this.form.erp_order_sn_number, label_sort: this.form.label_sort }, true).then(res => {
if (res.err_code === 0) {
this.printLabelData = res.data;
this.wstyptll_id = res.data[0].wstyptll_id;
this.sendDataChange(); //发送数据
} else {
uni.showToast({
......@@ -206,7 +208,7 @@ export default {
data.push('T 8 0 10 220 仓库代码:' + this.printLabelData[this.print_number].warehouse_code + '\r\n');
data.push('T 8 0 10 260 流水号:' + this.printLabelData[this.print_number].wstyptll_id_sn + '\r\n');
data.push('B QR 280 110 M 2 U 8\r\n');
data.push('MA,' + this.printLabelData[this.print_number].erp_order_sn + '|\r\n');
data.push('MA,' + this.printLabelData[this.print_number]['box_code'] + '|\r\n');
data.push('ENDQR\r\n');
data.push('FORM\r\n');
data.push('PRINT\r\n');
......@@ -258,11 +260,20 @@ export default {
uni.hideLoading();
uni.showModal({
title: '提示',
content: '打印失败,请检查打印机',
content: '打印失败,请重新进入打印页面',
showCancel: false,
confirmText: '关闭',
success: function(res) {
if (res.confirm) {
this.characteristics = ''; //连接蓝牙信息清空
this.deviceId = ''; //连接蓝牙信息清空
this.device_name = ''; //连接蓝牙信息清空
this.print_number = 0; //打印计数归零
this.printLabelData = []; //打印数据清空
this.sendData64 = ''; //发送蓝牙数据清空
this.delErpOrderSnCodeManage(); //及时作废
} else if (res.cancel) {
console.log('用户点击取消');
}
......@@ -277,10 +288,10 @@ export default {
this.sendDataChange();
} else {
uni.hideLoading();
//清空数据
this.print_number = 0;
this.printLabelData = [];
this.sendData64 = '';
//重置
this.print_number = 0; //打印计数归零
this.printLabelData = []; //打印数据清空
this.sendData64 = ''; //发送蓝牙数据清空
uni.showModal({
title: '提示',
content: '打印成功,请查看标签打印机',
......@@ -297,6 +308,19 @@ export default {
}
}
},
delErpOrderSnCodeManage() {
this.request(API.delWstyptllIdErpOrderSnCodeManage, 'POST', { wstyptll_id: this.wstyptll_id }, true).then(res => {
if (res.err_code === 0) {
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false,
confirmText: '关闭'
});
}
});
},
change(index, type) {
if (type == 'erp_order_sn_pre') {
//订单类型
......
No preview for this file type
const API_BASE = 'https://api.ichunt.com';
//const API_BASE = 'http://api.liexin.com'
//const API_BASE = 'https://api.ichunt.com';
const API_BASE = 'http://api.liexin.com';
const API = {
/**
* 上传数据
......@@ -88,8 +88,23 @@ const API = {
/**
* 获取理货问客详情
*/
getAskCustomerDetail: API_BASE + '/supplywechatwms/getAskCustomerDetail'
getAskCustomerDetail: API_BASE + '/supplywechatwms/getAskCustomerDetail',
/**
* 作废
*/
delWstyptllIdErpOrderSnCodeManage: API_BASE + '/supplywechatwms/delWstyptllIdErpOrderSnCodeManage',
/**
* 条码管理列表
*/
erpOrderSnCodeManage: API_BASE + '/supplywechatwms/erpOrderSnCodeManage',
/**
* 装箱复核时序蒲
*/
rePackageList: API_BASE + '/supplywechatwms/rePackageList',
/**
* 作废条码
*/
delErpOrderSnCodeManage: API_BASE + '/supplywechatwms/delErpOrderSnCodeManage'
}
......
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 sign in to comment