Commit 520177e1 by LJM

add

parent 32d448e5
.unboxing {
height: 100vh;
padding: 0 24rpx;
overflow: hidden;
.input-box {
margin-top: 24rpx;
margin-bottom: 24rpx;
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
padding: 0 24rpx;
.uni-input {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
.btn {
width: 144rpx;
height: 48rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
}
.btn1 {
width: 144rpx;
height: 48rpx;
background: #ffffff;
border-radius: 4rpx;
border: 1px solid #197adb;
font-size: 24rpx;
color: #197adb;
}
.icon-jinggao2 {
font-size: 30rpx;
color: #c6c7cc;
margin-right: 30rpx;
}
}
.column-box {
padding: 0 24rpx;
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
.action-bar {
.btn {
width: 144rpx;
height: 48rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
}
.btn1 {
width: 144rpx;
height: 48rpx;
background: #ffffff;
border-radius: 4rpx;
border: 1px solid #197adb;
font-size: 24rpx;
color: #197adb;
}
.icon-jinggao2 {
font-size: 30rpx;
color: #c6c7cc;
margin-right: 30rpx;
}
}
.select-box {
width: 129rpx;
margin-right: 22rpx;
.wrap {
.uni-input {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
}
.uni-arrow {
font-size: 17rpx;
color: #9ca8ad;
}
}
.input-box {
.uni-input {
font-weight: bold;
font-size: 28rpx;
color: #404547;
&.disabled {
opacity: 0.8;
}
}
}
}
.list {
padding-bottom: 30rpx;
height: calc(100% - 240rpx);
.box {
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
padding: 24rpx;
transition: all 0.4s ease;
&.disabled {
background-color: #f2f9ff;
border: 1px solid #bbdcfd;
}
.pb16 {
padding-bottom: 16rpx;
}
.w130 {
width: 156rpx;
}
.t1 {
font-size: 28rpx;
color: #404547;
font-weight: bold;
}
.t2 {
width: 48rpx;
height: 36rpx;
border-radius: 4rpx;
border: 1px solid #197adb;
font-size: 24rpx;
color: #197adb;
margin-left: 16rpx;
}
.t3 {
font-size: 26rpx;
color: #6e767a;
}
.t4 {
font-size: 26rpx;
color: #404547;
}
.t5 {
font-size: 24rpx;
color: #197adb;
margin-left: 16rpx;
}
.input-text {
position: relative;
z-index: 2;
.uni-input {
width: 173rpx;
height: 48rpx;
background: #e6edf0;
border-radius: 4rpx;
padding-left: 20rpx;
font-size: 26rpx;
color: #404547;
font-weight: bold;
}
}
.upload-list {
.default {
width: 88rpx;
height: 88rpx;
background-color: #f1f4f6;
border: 1px solid #e6edf0;
.iconfont {
font-size: 48rpx;
color: #d8d8d8;
}
}
.pic-box {
position: relative;
width: 88rpx;
height: 88rpx;
margin-right: 10rpx;
&:nth-of-type(4n) {
margin-right: 0;
}
image {
width: 88rpx;
height: 88rpx;
}
.delete {
position: absolute;
right: 0rpx;
top: -13rpx;
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: #bb3434;
z-index: 9;
.iconfont {
font-size: 20rpx;
color: #ffffff;
}
}
}
}
.btn {
width: 190rpx;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 26rpx;
color: #ffffff;
&.disabled {
background: #9ca8ad;
}
}
}
}
.scroll-Y {
height: 100%;
}
}
.popup-content {
padding: 28rpx 24rpx 24rpx 24rpx;
.selected-items {
flex-wrap: wrap;
.box {
padding: 0 12rpx;
height: 44rpx;
background: #ffffff;
border-radius: 4rpx;
border: 1px solid #197adb;
margin-right: 16rpx;
margin-bottom: 16rpx;
.text {
font-size: 24rpx;
color: #197adb;
}
.close {
margin-left: 5rpx;
font-size: 36rpx;
color: #197adb;
}
}
}
.search-baar {
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
padding-left: 24rpx;
margin-bottom: 16rpx;
.iconfont {
font-size: 36rpx;
color: #6e767a;
}
.uni-input {
margin-left: 15rpx;
font-size: 28rpx;
color: #404547;
}
}
.data-list {
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 22rpx;
max-height: 504rpx;
overflow-y: auto;
.box {
margin: 0 24rpx;
height: 84rpx;
border-bottom: 1rpx solid #e6edf0;
&:last-child {
border-bottom: none;
}
.text {
font-size: 26rpx;
color: #404547;
}
.check-ico {
width: 24rpx;
height: 25rpx;
background: url('https://img.ichunt.com/images/ichunt/202309/14/3743c01230310f62a2afa41a6c2eea96.png') no-repeat center;
background-size: contain;
display: block;
}
&.curr {
.text {
color: #197adb;
}
.check-ico {
background: url('https://img.ichunt.com/images/ichunt/202309/14/e651ddae61b5f02af4129f723b2cf74f.png') no-repeat center;
background-size: contain;
}
}
}
}
.pop-btn {
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
}
}
......@@ -65,6 +65,11 @@
"navigationBarTitleText": "追加标签"
}
}, {
"path": "pages/tag/repairPrintNew",
"style": {
"navigationBarTitleText": "追加标签"
}
}, {
"path": "pages/goods/receiving",
"style": {
"navigationBarTitleText": "收货登记"
......
......@@ -234,7 +234,7 @@
// #ifdef MP-WEIXIN
uni.navigateTo({
url: '/pages/tag/print'
url: '/pages/tag/printNew'
});
// #endif
......@@ -247,7 +247,7 @@
} else if (item.name == '追加标签') {
uni.navigateTo({
url: '/pages/tag/repairPrint'
url: '/pages/tag/repairPrintNew'
});
} else if (item.name == '收货登记') {
uni.navigateTo({
......
<template>
<view class="print-index">
<view class="print-form">
<view class="box row verCenter">
<view class="label">打印类型</view>
<view class="tab row verCenter">
<view class="tab-pane row rowCenter verCenter" v-for="(item, index) in items_print_type" :key="index" :class="{ curr: index_print_type == index }" @click="change(index, 'print_type')">{{ item }}</view>
</view>
</view>
<view class="box row verCenter">
<view class="row verCenter" style="flex:0 0 93%">
<view class="label">入仓号</view>
<input type="text" v-model="form.erp_order_sn" placeholder-style="font-size:24rpx;color:#404547;" class="uni-input" placeholder="请输入" />
</view>
<text class="scan iconfont icon-juxing6" @click="scanChange()"></text>
</view>
<view class="box row verCenter">
<view class="label">{{ text }}</view>
<input type="number" v-model="form.label_num" placeholder-style="font-size:24rpx;color:#404547;" class="uni-input" placeholder="请输入" />
</view>
<view class="box row verCenter">
<view class="label">批次</view>
<view class="pick-box row">
<picker @change="bindPickerChangeBatch" :value="form.batch" :range="batchArr" class="picker">
<view class="uni-input">{{ batchArr[form.batch] }}</view>
</picker>
</view>
</view>
</view>
<view class="btn row rowCenter verCenter" @click="submit()">提交打印</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {
print_number: 0,
serviceId: '',
deviceId: '',
device_name: '',
characteristics: '',
text: '标签数量',
index_erp_order_sn_pre: -1,
index_print_type: 1,
items_erp_order_sn_pre: ['A单号', 'B单号', 'D单号'],
items_print_type: ['卡板', '散箱'],
sendData64: '',
platform: 'android',
printLabelData: [],
wstyptll_id: '',
batchArr: [0, 1, 2, 3, 4, 5, 6],
form: {
batch: 0, //批次
is_add: 1,
print_type: 2,
erp_order_sn_pre: '',
erp_order_sn_number: '',
erp_order_sn: '', //入仓号
label_num: ''
}
};
},
onLoad(option) {
},
onShow() {
},
methods: {
bindPickerChangeBatch(e) {
this.form.batch = e.target.value;
},
scanChange() {
uni.scanCode({
success: res => {
if (res.errMsg == 'scanCode:ok') {
this.form.erp_order_sn = res.result;
}
},
fail: function(res) {
uni.showToast({
title: '扫码失败',
icon: 'error'
});
}
});
},
submit() {
if (!this.form.erp_order_sn) {
uni.showModal({
title: '提示',
content: '请输入入仓号',
showCancel: false
});
return false;
}
if (!this.form.label_num) {
uni.showModal({
title: '提示',
content: '请输入' + this.text,
showCancel: false
});
return false;
}
if (!/(^[0-9]*$)/.test(this.form.label_num)) {
uni.showModal({
title: '提示',
content: this.text + '为纯数字',
showCancel: false
});
return false;
}
this.request(API.checkRepeatPrintLabel, 'POST', this.form, true).then(res => {
if (res.err_code === 0) {
this.printLabelChange();
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
confirmText: '继续打印',
success: res => {
if (res.confirm) {
this.printLabelChange();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
},
/**
* 打印标签
*/
printLabelChange() {
this.request(API.printLabel, 'POST', this.form, true).then(res => {
if (res.err_code === 0) {
this.printLabelData = res.data;
this.wstyptll_id = res.data[0].wstyptll_id;
if (res.data.length > 0) {
this.addSupplyChainData(JSON.stringify(res.data));
}
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
confirmText: '关闭'
});
}
});
},
/**
* 调取蓝牙wifi打印
*/
addSupplyChainData(params) {
this.request(API.addSupplyChainData, 'POST', { print_json: params }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '正在打印中',
icon: 'success'
});
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
* 打印失败的时候作废
*/
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') {
//订单类型
this.index_erp_order_sn_pre = index;
if (index == 0) {
this.form.erp_order_sn_pre = 'A';
} else if (index == 1) {
this.form.erp_order_sn_pre = 'B';
} else if (index == 2) {
this.form.erp_order_sn_pre = 'D';
}
} else if (type == 'print_type') {
//打印类型
this.index_print_type = index;
if (index == 0) {
this.form.print_type = 1;
this.text = '总箱数';
} else if (index == 1) {
this.form.print_type = 2;
this.text = '标签数量';
}
}
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/tag/print.scss';
</style>
\ No newline at end of file
<template>
<view class="popup-root" v-if="isOpen" v-show="isShow" @click="clickMask">
<view @click.stop>
<slot></slot>
</view>
</view>
</template>
<script>
type CloseCallBack = ()=> void;
let closeCallBack:CloseCallBack = () :void => {};
export default {
emits:["close","clickMask"],
data() {
return {
isShow:false,
isOpen:false
}
},
props: {
maskClick: {
type: Boolean,
default: true
},
},
watch: {
// 设置show = true 时,如果没有 open 需要设置为 open
isShow:{
handler(isShow) {
// console.log("isShow",isShow)
if(isShow && this.isOpen == false){
this.isOpen = true
}
},
immediate:true
},
// 设置isOpen = true 时,如果没有 isShow 需要设置为 isShow
isOpen:{
handler(isOpen) {
// console.log("isOpen",isOpen)
if(isOpen && this.isShow == false){
this.isShow = true
}
},
immediate:true
}
},
methods:{
open(){
// ...funs : CloseCallBack[]
// if(funs.length > 0){
// closeCallBack = funs[0]
// }
this.isOpen = true;
},
clickMask(){
if(this.maskClick == true){
this.$emit('clickMask')
this.close()
}
},
close(): void{
this.isOpen = false;
this.$emit('close')
closeCallBack()
},
hiden(){
this.isShow = false
},
show(){
this.isShow = true
}
}
}
</script>
<style>
.popup-root {
position: fixed;
top: 0;
left: 0;
width: 750rpx;
height: 100%;
flex: 1;
background-color: rgba(0, 0, 0, 0.3);
justify-content: center;
align-items: center;
z-index: 99;
}
</style>
\ 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 sign in to comment