Commit 9394c104 by LJM

打印

parent b33f6893
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
} }
} }
.uni-list-cell-db { .uni-list-cell-db {
width: calc(100% - 160rpx); width: calc(100% - 369rpx);
position: relative; position: relative;
.icon-sanjiaoxing1 { .icon-sanjiaoxing1 {
position: absolute; position: absolute;
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
.uni-input { .uni-input {
font-size: 24rpx; font-size: 24rpx;
color: #404547; color: #404547;
font-weight: bold;
} }
&.operate { &.operate {
justify-content: flex-end; justify-content: flex-end;
...@@ -63,4 +62,92 @@ ...@@ -63,4 +62,92 @@
} }
} }
} }
.uni-table-box {
padding-bottom: 24rpx;
background-color: #ffffff;
::v-deep .uni-table-scroll {
}
::v-deep .uni-table {
min-width: 100% !important;
}
.uni-input {
border: 1px #ebeef5 solid;
}
}
.fix-box {
position: fixed;
bottom: 0;
width: 100%;
height: 98rpx;
background: #ffffff;
padding: 0 24rpx;
z-index: 999;
.t1 {
font-size: 22rpx;
color: #404547;
}
.t2 {
font-size: 32rpx;
color: #197adb;
font-weight: bold;
}
.btn {
width: 252rpx;
height: 78rpx;
background: #bb3434;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
}
}
.save {
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
}
}
::v-deep {
.uni-table-scroll {
width: auto !important;
margin: 0 24rpx;
}
.checkbox {
width: 45px !important;
display: flex !important;
align-items: center;
}
.disabledClass {
.checkbox {
.is-checked {
background-color: #e6edf0 !important;
border-color: #e6edf0 !important;
}
}
}
.uni-table-tr {
display: flex !important;
}
.uni-table-th,
.uni-table-td {
display: flex !important;
font-weight: normal !important;
&:nth-child(2) {
width: 16% !important;
}
&:nth-child(3) {
width: 34% !important;
}
&:nth-child(4) {
width: 22% !important;
}
&:nth-child(5) {
width: 28% !important;
}
}
.uni-table-td {
border-right: 1px #ebeef5 solid;
}
} }
<template> <template>
<view class="scanInventory"> <view class="scanInventory">
<view class="scanInven-form-item"> <view class="scanInven-form-item">
<view class="box row verCenter operate"> <view class="box row verCenter operate"><text>箱列表</text></view>
<text>关箱保存</text>
<text>箱列表</text>
</view>
<view class="box row verCenter"> <view class="box row verCenter">
<view class="label">箱号</view> <view class="label">箱号</view>
<input type="number" placeholder-style="font-size:24rpx;color:#404547;" class="uni-input" placeholder="请输入箱号" /> <input v-model="box_sn" @input="inputChange" placeholder-style="font-size:24rpx;" class="uni-input" placeholder="请输入箱号" />
</view> </view>
<view class="box row verCenter"> <view class="box row verCenter">
<view class="label">扫描</view> <view class="label">扫描</view>
<input v-model="code_str" @input="scanChange" placeholder-style="font-size:24rpx;" class="uni-input" placeholder="扫描焦点" style="width: 261rpx;" />
<view class="uni-list-cell-db"> <view class="uni-list-cell-db">
<text class="iconfont icon-sanjiaoxing1"></text> <text class="iconfont icon-sanjiaoxing1"></text>
<picker @change="bindPickerChange" :value="index" :range="array"> <picker @change="bindPickerChange" :value="index" :range="array">
<view class="uni-input">{{ array[index] || '请选择扫描类型' }}</view> <view class="uni-input" style="text-align: center;">{{ array[index] || '请选择扫描类型' }}</view>
</picker> </picker>
</view> </view>
</view> </view>
</view> </view>
<view class="uni-table-box">
<uni-table type="selection" border stripe emptyText="暂无更多数据" @selection-change="selectionChange">
<uni-tr>
<uni-th align="center">序号</uni-th>
<uni-th align="center">型号</uni-th>
<uni-th align="center">数量</uni-th>
<uni-th align="center">扫描时间</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in list" :key="index">
<uni-td align="center">{{ index + 1 }}</uni-td>
<uni-td align="center"><input class="uni-input" :value="item.goods_sn" /></uni-td>
<uni-td align="center"><input class="uni-input" :value="item.goods_num" /></uni-td>
<uni-td align="center">{{ item.scan_time_cn }}</uni-td>
</uni-tr>
</uni-table>
</view>
<view class="save row rowCenter verCenter" @click="submit()">关箱保存</view>
<view class="fix-box row bothSide verCenter">
<view>
<text class="t1">已选择:</text>
<text class="t2">{{ selectedIndexs.length }}</text>
</view>
<view class="btn row rowCenter verCenter" @click="deleteChange">删除</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
export default {
data() {
return {
box_sn: '',
code_str: 'QTY:500 PN:PR03-1R CPN:PR03000201008JAC00 PO:18365781/11 CPO:B131190+A64120 MFR:VISHAY MPN:PR03000201008JAC00 RoHS',
code_type: '',
list: [],
selectedIndexs: [],
index: -1,
array: ['扫描digikey', '扫描Mouser', '扫描Arrow', '扫描Rochester', '扫描TME', '扫描Chip1stop'],
arrar_val: ['digikey', 'Mouser', 'Arrow', 'Rochester', 'TME', 'Chip1stop']
};
},
created() {},
methods: {
getBoxSnAndNum() {
this.request(API.getBoxSnAndNum, 'POST', { box_sn: this.box_sn }, false).then(res => {
if (res.err_code === 0) {
this.list = res.data;
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
},
identifyQrCodeNumAndSn() {
this.request(API.identifyQrCodeNumAndSn, 'POST', { code_str: this.code_str, code_type: this.code_type }, false).then(res => {
if (res.err_code === 0) {
this.list.unshift({
goods_num: res.data.num || '',
goods_sn: res.data.sn || '',
scan_time: '',
wsbxnmsn_id: ''
});
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
},
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value);
this.index = e.target.value;
this.code_type = this.arrar_val[e.target.value];
this.identifyQrCodeNumAndSn();
},
selectionChange(e) {
this.selectedIndexs = e.detail.index;
},
scanChange(event) {
var val = event.target.value;
if (val) {
this.identifyQrCodeNumAndSn();
}
},
inputChange(event) {
var val = event.target.value;
if (val) {
this.getBoxSnAndNum();
}
},
deleteChange() {
if (this.selectedIndexs.length <= 0) {
uni.showModal({
title: '提示',
content: '请选择要删除的数据',
showCancel: false
});
return false;
}
for (let i = 0; i < this.selectedIndexs.length; i++) {
this.list.splice(this.selectedIndexs[i], 1);
}
export default { },
data() { submit() {}
return {
index: -1,
array: ['扫描digikey', '扫描Mouser', '扫描Arrow', '扫描Rochester', '扫描TME', '扫描Chip1stop']
};
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value);
this.index = e.target.value;
} }
} };
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import '../../assets/css/scanInventory/index.scss'; @import '../../assets/css/scanInventory/index.scss';
</style> </style>
...@@ -77,6 +77,7 @@ $border-color: #ebeef5; ...@@ -77,6 +77,7 @@ $border-color: #ebeef5;
color: #606266; color: #606266;
line-height: 23px; line-height: 23px;
box-sizing: border-box; box-sizing: border-box;
word-break: break-word;
} }
.table--border { .table--border {
......
...@@ -145,10 +145,22 @@ const API = { ...@@ -145,10 +145,22 @@ const API = {
* 获取今天的报关收货统计 * 获取今天的报关收货统计
*/ */
getCustomsDeclarationAndReceiptStatistics: API_BASE + '/supplywechatwms/getCustomsDeclarationAndReceiptStatistics', getCustomsDeclarationAndReceiptStatistics: API_BASE + '/supplywechatwms/getCustomsDeclarationAndReceiptStatistics',
/**
* 获取当前箱号的数据
*/
getBoxSnAndNum: API_BASE + '/supplywechatwms/getBoxSnAndNum',
/**
* 识别二维码数量和型号
*/
identifyQrCodeNumAndSn: API_BASE + '/supplywechatwms/identifyQrCodeNumAndSn',
/**
* 提交当前箱号的数据
*/
submitBoxSnAndNum: API_BASE + '/supplywechatwms/submitBoxSnAndNum'
} }
module.exports = { module.exports = {
API API
} }
\ 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