Commit 10d758f8 by liangjianmin

连接蓝牙

parent 9a1bb78e
......@@ -11,6 +11,26 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-a-juxing12:before {
content: "\e77f";
}
.icon-juxing7:before {
content: "\e77d";
}
.icon-sanjiaoxing2:before {
content: "\e77e";
}
.icon-bianzu:before {
content: "\e77b";
}
.icon-a-Fill3:before {
content: "\e77c";
}
.icon-xingzhuangjiehe:before {
content: "\e74f";
}
......
......@@ -24,14 +24,18 @@
}
.toggle {
.iconfont {
font-size: 16rpx;
font-size: 15rpx;
color: #9ca8ad;
transform: rotate(180deg);
}
.tt {
margin-left: 11rpx;
font-size: 24rpx;
color: #404547;
}
.rotate{
transform: rotate(0deg);
}
}
}
.pp {
......@@ -81,6 +85,14 @@
color: #6e767a;
margin-right: 60rpx;
}
.input-wrap{
width: calc(100% - 160rpx);
.tab-panel{
&:last-child{
margin-right: 0;
}
}
}
.tab {
.tab-panel {
width: 120rpx;
......@@ -132,6 +144,8 @@
}
}
.upload-box {
position: relative;
z-index: 1;
padding-top: 23rpx;
padding-bottom: 24rpx;
.title {
......@@ -204,6 +218,8 @@
}
}
.btn {
position: relative;
z-index: 2;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
......
.tally{
}
\ No newline at end of file
.tally {
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;
}
}
}
.tab {
height: 114rpx;
background-color: #f1f4f6;
padding-left: 24px;
.box {
position: relative;
font-size: 26rpx;
color: #404547;
margin-right: 44rpx;
transition: all 0.4s ease;
.t2 {
display: block;
}
&.curr {
color: #1e2021;
font-size: 32rpx;
font-weight: bold;
.t2 {
display: flex;
}
&:after {
position: absolute;
bottom: -16rpx;
left: 0;
right: 0;
width: 100%;
height: 6rpx;
background: #197adb;
border-radius: 3rpx;
content: '';
}
}
}
}
.list {
margin-top: 24rpx;
padding: 0 24rpx;
.box {
position: relative;
padding: 0 20rpx;
height: 198rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 40rpx;
.bill-number {
position: absolute;
top: -20rpx;
left: 20rpx;
width: 185rpx;
height: 48rpx;
border-radius: 4rpx;
font-size: 26rpx;
color: #ffffff;
font-weight: bold;
&.color1 {
background: #197adb;
}
&.color2 {
background: #f39d18;
}
}
.text {
.p1 {
font-size: 22rpx;
color: #6e767a;
margin-right: 16rpx;
}
.p2 {
font-size: 22rpx;
color: #404547;
}
.mr49 {
margin-right: 49rpx;
}
}
.t1 {
font-size: 28rpx;
color: #1e2021;
margin-bottom: 18rpx;
}
.words-text {
font-size: 26rpx;
color: #197adb;
}
}
}
}
.tallyDetail {
margin-top: 24rpx;
padding: 0 24rpx 24rpx 24rpx;
.base-information {
padding: 24rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
.top {
margin-bottom: 24rpx;
.title {
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
margin-right: 16rpx;
border-radius: 50%;
}
.tt {
font-size: 32rpx;
color: #1e2021;
font-weight: bold;
}
}
.toggle {
.iconfont {
font-size: 15rpx;
color: #9ca8ad;
transform: rotate(180deg);
}
.tt {
margin-left: 11rpx;
font-size: 24rpx;
color: #404547;
}
.rotate {
transform: rotate(0deg);
}
}
}
.pp {
margin-bottom: 20rpx;
&.mb0 {
margin-bottom: 0;
}
.t1 {
width: 120rpx;
font-size: 24rpx;
color: #6e767a;
margin-right: 16rpx;
}
.t2 {
width: 73%;
font-size: 24rpx;
color: #404547;
}
.type {
width: 72rpx;
height: 36rpx;
border-radius: 4rpx;
border: 1px solid #197adb;
font-size: 24rpx;
color: #197adb;
margin-left: 28rpx;
}
}
}
.tally-base-information {
padding: 24rpx 24rpx 0 24rpx;
background: #ffffff;
border-radius: 4rpx;
.top {
.title {
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
margin-right: 16rpx;
border-radius: 50%;
}
.tt {
font-size: 32rpx;
color: #1e2021;
font-weight: bold;
}
}
}
.list {
.box {
position: relative;
padding: 24rpx 0;
border-bottom: 1px solid #e6edf0;
.pp {
.w {
flex: 0 0 50%;
}
margin-bottom: 16rpx;
.t1 {
font-size: 22rpx;
color: #6e767a;
}
.t2 {
font-size: 22rpx;
color: #404547;
}
}
.input-box {
.t1 {
font-size: 22rpx;
color: #6e767a;
}
.uni-input {
width: 319rpx;
height: 48rpx;
background: #e6edf0;
border-radius: 4rpx;
font-size: 24rpx;
color: #404547;
padding-left: 20rpx;
margin-left: 9rpx;
}
}
.photograph {
width: 80rpx;
height: 48rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 22rpx;
color: #ffffff;
}
.pic {
position: absolute;
right: 0;
top: 24rpx;
width: 88rpx;
height: 88rpx;
}
}
}
.btn-submit {
height: 77rpx;
border-bottom: 1px solid #e6edf0;
.t1 {
font-size: 22rpx;
color: #404547;
}
.t2 {
font-size: 22rpx;
color: #197adb;
}
}
.receiving-information {
padding: 0 24rpx 0 24rpx;
background: #ffffff;
border-radius: 4rpx;
.top {
margin-bottom: 24rpx;
.title {
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
margin-right: 16rpx;
border-radius: 50%;
}
.tt {
font-size: 32rpx;
color: #1e2021;
font-weight: bold;
}
}
}
.box {
height: 80rpx;
border-bottom: 1px solid #e6edf0;
.label {
width: 98rpx;
font-size: 24rpx;
color: #6e767a;
margin-right: 60rpx;
}
.input-wrap {
width: calc(100% - 160rpx);
.tab-panel {
&:last-child {
margin-right: 0;
}
}
}
.tab {
.tab-panel {
width: 120rpx;
height: 48rpx;
background: #9ca8ad;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
margin-right: 24rpx;
&.curr {
background: #197adb;
}
}
}
.uni-list-cell-db {
width: calc(100% - 160rpx);
position: relative;
.icon-sanjiaoxing1 {
position: absolute;
right: 0;
top: 15rpx;
font-size: 17rpx;
color: #9ca8ad;
}
}
.uni-input {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
.uni-input-box {
width: calc(100% - 160rpx);
.uni-input {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
.scan-view {
.iconfont {
font-size: 48rpx;
color: #197adb;
margin-right: 10rpx;
}
.tt {
font-size: 24rpx;
color: #197adb;
}
}
}
}
.textarea-box {
border-bottom: 1px solid #e6edf0;
position: relative;
padding-top: 23rpx;
height: 137rpx;
textarea {
height: 100%;
font-size: 24rpx;
color: #6e767a;
}
.text {
position: absolute;
right: 0;
bottom: 24rpx ;
font-size: 24rpx;
color: #9ca8ad;
}
}
}
}
.btn {
position: relative;
z-index: 2;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
margin-top: 48rpx;
}
}
.tallyExectionDetail{
}
\ No newline at end of file
.tallyDetail {
margin-top: 24rpx;
padding: 0 24rpx 24rpx 24rpx;
.base-information {
padding: 24rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
.top {
margin-bottom: 24rpx;
.title {
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
margin-right: 16rpx;
border-radius: 50%;
}
.tt {
font-size: 32rpx;
color: #1e2021;
font-weight: bold;
}
}
.toggle {
.iconfont {
font-size: 15rpx;
color: #9ca8ad;
transform: rotate(180deg);
}
.tt {
margin-left: 11rpx;
font-size: 24rpx;
color: #404547;
}
.rotate {
transform: rotate(0deg);
}
}
}
.pp {
margin-bottom: 20rpx;
&.mb0 {
margin-bottom: 0;
}
.t1 {
width: 120rpx;
font-size: 24rpx;
color: #6e767a;
margin-right: 16rpx;
}
.t2 {
width: 73%;
font-size: 24rpx;
color: #404547;
}
.type {
width: 72rpx;
height: 36rpx;
border-radius: 4rpx;
border: 1px solid #197adb;
font-size: 24rpx;
color: #197adb;
margin-left: 28rpx;
}
}
}
.question-box {
padding: 0 24rpx;
background: #ffffff;
border-radius: 4rpx;
.top {
height: 87rpx;
.t1 {
width: 156rpx;
font-size: 24rpx;
color: #6e767a;
}
.el-select-box {
width: calc(100% - 156rpx);
.uni-input {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
}
}
.uni-table {
.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: #6e767a;
padding-left: 23rpx;
border-right: 1px solid #cad9e0;
&:last-child {
border-right: none;
}
}
}
.uni-tr {
height: 62rpx;
border-bottom: 1px solid #cad9e0;
.icon-a-Fill3{
font-size: 24rpx;
color: #6E767A;
}
.txt{
font-size: 22rpx;
color: #404547;
}
.uni-input{
font-size: 22rpx;
color: #404547;
}
.default{
width: 24rpx;
height: 24rpx;
border: 1px solid #D2DFE5;
border-radius: 50%;
}
.iconfont{
font-size: 24rpx;
color: #197ADB;
}
.w {
height: 100%;
flex: 0 0 25%;
padding-left: 23rpx;
border-right: 1px solid #cad9e0;
&:last-child {
border-right: none;
}
}
}
}
.upload-box {
position: relative;
z-index: 1;
padding-top: 23rpx;
padding-bottom: 24rpx;
.title {
margin-bottom: 24rpx;
.tt-l {
font-size: 24rpx;
color: #6e767a;
}
.tt-r {
font-size: 24rpx;
color: #404547;
}
}
.upload-list {
padding-bottom: 48rpx;
border-bottom: 1px solid #e6edf0;
.default {
width: 144rpx;
height: 144rpx;
background-color: #f1f4f6;
border: 1rpx solid #e6edf0;
.iconfont {
font-size: 48rpx;
color: #d8d8d8;
}
}
.pic-box {
position: relative;
flex: 0 0 25%;
margin-right: 10rpx;
&:nth-of-type(4n) {
margin-right: 0;
}
image {
width: 144rpx;
height: 144rpx;
}
.delete {
position: absolute;
right: 10rpx;
top: -13rpx;
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: #bb3434;
z-index: 999;
.iconfont {
font-size: 20rpx;
color: #ffffff;
}
}
}
}
.textarea-box {
position: relative;
padding-top: 23rpx;
height: 80rpx;
textarea {
font-size: 24rpx;
color: #6e767a;
}
.text {
position: absolute;
right: 0;
bottom: 0;
font-size: 24rpx;
color: #9ca8ad;
}
}
}
.textarea-box {
position: relative;
padding-top: 23rpx;
height: 137rpx;
textarea {
height: 100%;
font-size: 24rpx;
color: #6e767a;
}
.text {
position: absolute;
right: 0;
bottom: 24rpx;
font-size: 24rpx;
color: #9ca8ad;
}
}
}
.btn {
position: relative;
z-index: 2;
height: 88rpx;
background: #bb3434;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
margin-top: 48rpx;
}
.rebtn {
height: 88rpx;
background: transparent;
font-size: 28rpx;
color: #197adb;
}
}
.deviceList {
padding: 24rpx 24rpx 0 24rpx;
.device-box {
padding: 0 24rpx;
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
.icon-juxing7 {
font-size: 36rpx;
color: #9ca8ad;
}
.t1 {
font-size: 28rpx;
color: #1e2021;
margin-left: 20rpx;
}
.close {
font-size: 28rpx;
color: #bb3434;
}
}
.title {
height: 92rpx;
padding-right: 24rpx;
.t1 {
font-size: 28rpx;
color: #1e2021;
}
.iconfont {
font-size: 36rpx;
color: #404547;
}
.t2 {
font-size: 22rpx;
color: #404547;
margin-left: 8rpx;
}
}
.list{
background: #FFFFFF;
border-radius: 4rpx;
.box{
margin: 0 24rpx;
height: 88rpx;
border-bottom: 1px solid #E6EDF0;
&:last-child{
border-bottom: none;
}
.t1{
font-size: 28rpx;
color: #1E2021;
}
.t2{
font-size: 26rpx;
color: #197ADB;
}
}
}
}
.print-index{
padding: 24rpx 24rpx 0 24rpx;
.device-box{
height: 88rpx;
background: #FFFFFF;
border-radius: 4rpx;
padding: 0 24rpx;
margin-bottom: 16rpx;
.t1{
font-size: 28rpx;
color: #1E2021;
margin-left: 20rpx ;
}
.t2{
font-size: 22rpx;
color: #6E767A;
margin-right: 14rpx ;
&.active{
color: #1E2021;
font-weight: bold;
}
}
.icon-juxing7{
font-size: 36rpx;
color: #9CA8AD;
}
.icon-sanjiaoxing2{
font-size: 20rpx;
color: #9CA8AD;
}
}
.print-form{
background: #FFFFFF;
border-radius: 4rpx;
......
......@@ -70,7 +70,27 @@
"style": {
"navigationBarTitleText": "理货列表"
}
},{
"path": "pages/goods/tallyExectionDetail",
"style": {
"navigationBarTitleText": "理货作业"
}
},{
"path": "pages/goods/tallyDetail",
"style": {
"navigationBarTitleText": "理货作业"
}
}, {
"path": "pages/goods/tallyQuestion",
"style": {
"navigationBarTitleText": "异常理货问客"
}
},{
"path": "pages/tag/deviceList",
"style": {
"navigationBarTitleText": "连接设备"
}
},{
"path": "pages/mine/login",
"style": {
"navigationBarTitleText": "登录"
......
<template>
<view class="tally">
<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="number" placeholder-style="color:#6e767a" />
<text class="scan iconfont icon-juxing6"></text>
</view>
</view>
</view>
<view class="tab row verCenter">
<view class="box row" @click="changeTab(index)" :class="{ curr: index == currentIndex }" :key="index" v-for="(item, index) in textArr">
<text class="t1">{{ item }}</text>
<text class="t2">({{ total }})</text>
</view>
</view>
<view class="list" v-if="checkInList.length > 0">
<navigator class="box row bothSide verCenter" :url="'/pages/goods/tallyDetail?number=' + item.number" hover-class="none" v-for="(item, index) in checkInList" :key="index">
<view class="bill-number row rowCenter verCenter" :class="numberType[index] ? 'color1' : 'color2'">{{ item.number }}</view>
<view>
<text class="t1">客户:{{ item.customer }}</text>
<view class="text">
<text class="p1">下单:</text>
<text class="p2 mr49">{{ item.orderDate }}</text>
<text class="p1">登记数量:</text>
<text class="p2">{{ item.businessPerson }}</text>
</view>
<view class="text">
<text class="p1">备注:</text>
<text class="p2">INV-9500148113这张里有个是光辉的,TRM</text>
</view>
</view>
<text class="words-text">{{ item.delivery }}</text>
</navigator>
</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>
......@@ -10,15 +50,60 @@ import { API } from '@/util/api.js';
export default {
data() {
return {
currentIndex: 0,
date: '',
datetimerange: ['', ''],
textArr: ['等待理货', '理货异常'],
number: '',
total: 1,
page: 1,
limit: 100,
is_loading: false,
loading: false,
checkInList: [],
numberType: []
};
},
onReachBottom() {
if (this.is_loading) return;
this.page++;
this.loading = true;
this.getData();
},
onShow() {
this.getData();
},
methods: {
changeTab(index) {
this.currentIndex = index;
},
getData() {
this.request(API.userInfo, 'POST', {}, false).then(res => {});
this.request(API.getCheckInList, 'POST', { page: this.page, limit: this.limit, number: this.number, startDate: this.datetimerange[0], endDate: this.datetimerange[1] }, this.loading).then(res => {
if (res.err_code === 0) {
if (res.data.length > 0) {
this.is_loading = false;
this.checkInList = res.data;
//判断A单 B单
if (res.data.length > 0) {
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].number.indexOf('B')) {
this.numberType.push(true);
} else {
this.numberType.push(false);
}
}
}
} else {
this.is_loading = true;
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
}
}
};
......
<template>
<view class="tallyExectionDetail"></view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {};
},
onShow() {
this.getData();
},
methods: {
getData() {
this.request(API.getCheckInList, 'POST', {}).then(res => {
if (res.err_code === 0) {
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/goods/tallyExectionDetail.scss';
</style>
<template>
<view class="tallyDetail">
<view class="base-information">
<view class="top row bothSide verCenter">
<view class="title row verCenter">
<text class="arrow row rowCenter verCenter"></text>
<text class="tt">基础信息</text>
</view>
<view class="toggle row verCenter" @click="toggle()">
<text class="iconfont icon-sanjiaoxing" :class="{ rotate: flag }"></text>
<text class="tt">{{ flag ? '隐藏' : '展开' }}</text>
</view>
</view>
<view class="pp row verCenter">
<text class="t1">入仓号:</text>
<text class="t2" style="width: auto;">A123456</text>
<text class="type row rowCenter verCenter">商检</text>
</view>
<view class="pp row verCenter" v-if="flag">
<text class="t1">订单时间:</text>
<text class="t2">2021-11-02 15:17</text>
</view>
<view class="pp row verCenter" v-if="flag">
<text class="t1">订单客户:</text>
<text class="t2">富开香港有限公司</text>
</view>
<view class="pp row verCenter" v-if="flag">
<text class="t1">供应商:</text>
<text class="t2">SAMSUNG SDI CO., LTD</text>
</view>
<view class="pp row verCenter">
<text class="t1">登记数量:</text>
<text class="t2">1箱</text>
</view>
<view class="pp row">
<text class="t1">采购备注:</text>
<text class="t2">INV-9500148113这张里有个是光辉的,理货的人员记得看备注,多大200字符长度</text>
</view>
</view>
<view class="question-box">
<view class="top row verCenter">
<text class="t1">问题类型</text>
<view class="el-select-box">
<picker @change="bindPickerChange" :value="index" :range="array">
<view class="uni-input">{{ array[index] || '请选择' }}</view>
</picker>
</view>
</view>
<view class="uni-table">
<view class="uni-th row">
<text class="row verCenter">规格型号</text>
<text class="row verCenter">订单数量</text>
<text class="row verCenter">实到数量</text>
<text class="row verCenter">是否</text>
</view>
<view class="uni-tr row verCenter">
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<input type="text" placeholder="" v-model="d" class="w uni-input" />
<view class="w row verCenter">
<text class="default"></text>
</view>
</view>
<view class="uni-tr row">
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<input type="text" placeholder="" v-model="d" class="w uni-input" />
<text class="iconfont icon-bianzu w row verCenter"></text>
</view>
<view class="uni-tr row">
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<input type="text" placeholder="" v-model="d" class="w uni-input" />
<view class="w row verCenter">
<text class="default"></text>
</view>
</view>
</view>
<view class="upload-box">
<view class="title row bothSide verCenter">
<text class="tt-l">来货图片上传(必填)</text>
<text class="tt-r">{{ attachAddress.length }}/4</text>
</view>
<view class="upload-list row verCenter">
<template v-if="attachAddress.length > 0">
<view class="pic-box" v-for="(v, index) in attachAddress" :key="index">
<image :src="v" mode="aspectFill" lazy-load="true" @click="previewChange(attachAddress, index)"></image>
<view class="delete row rowCenter verCenter" @click="deletePic(index)"><text class="iconfont icon-shanchu"></text></view>
</view>
</template>
<view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="attachAddress.length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</view>
</view>
<view class="textarea-box">
<textarea @input="inputChange()" maxlength="200" placeholder="请输入异常备注" placeholder-style="color:#6E767A;" v-model="form.check_in_remark"></textarea>
<text class="text">{{ limitword }}/200</text>
</view>
</view>
<view class="btn row rowCenter verCenter" @click="submit()">提交委托单问客</view>
<view class="rebtn row rowCenter verCenter">保存并继续添加问题</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import w_md5 from '../../js_sdk/zww-md5/w_md5.js';
export default {
data() {
return {
d: '12',
flag: false,
limitword: 0,
index: -1,
attachAddress: [],
array: ['日本', '美国'],
form: {
check_in_remark: ''
}
};
},
onShow() {
this.getData();
},
methods: {
getData() {
this.request(API.getCheckInList, 'POST', { number: this.id }, this.loading).then(res => {
if (res.err_code === 0) {
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
},
previewChange(img, index) {
uni.previewImage({
current: index,
urls: img
});
},
deletePic(index) {
this.attachAddress.splice(index, 1);
},
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value);
this.index = e.target.value;
},
chooseImageChange() {
var self = this;
var time = parseInt(new Date().getTime() / 1000);
uni.chooseImage({
count: 4,
sourceType: ['album', 'camera'],
success: chooseImageRes => {
uni.showLoading({
title: '上传中...'
});
const tempFilePaths = chooseImageRes.tempFilePaths;
let maxNum = tempFilePaths.length * 1 + self.attachAddress.length * 1;
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过4张'
});
return false;
}
for (let i = 0; i < tempFilePaths.length; i++) {
console.log(tempFilePaths[i]);
uni.uploadFile({
url: 'http://api.liexin.com/oss/upload',
filePath: tempFilePaths[i],
name: 'upload',
formData: {
source: '1',
k1: time,
k2: w_md5.hex_md5_32(w_md5.hex_md5_32(String(time)) + 'fh6y5t4rr351d2c3bryi')
},
success: uploadFileRes => {
uni.hideLoading();
var data = JSON.parse(uploadFileRes.data);
console.log(data);
if (data.code === 200) {
self.attachAddress.push(data.data[0]);
} else {
uni.showToast({
title: data.message,
icon: 'error'
});
}
},
fail: error => {
uni.hideLoading();
console.log(error);
}
});
}
}
});
},
inputChange() {
if (this.form.check_in_remark.length <= 200) {
this.limitword = this.form.check_in_remark.length;
}
},
submit() {}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/goods/tallyQuestion.scss';
</style>
......@@ -12,7 +12,7 @@
</view>
</view>
<view class="show-box" v-if="shade_flag">
<view class="input-time row verCenter"><uni-datetime-picker @change="change" v-model="datetimerange" type="daterange" rangeSeparator="至" /></view>
<view class="input-time row verCenter"><uni-datetime-picker @change="changeTimeRange" v-model="datetimerange" type="daterange" rangeSeparator="至" /></view>
<view class="row bottom bothSide">
<view class="btn row rowCenter verCenter" @click="submit()">查 询</view>
<view class="canel row rowCenter verCenter" @click="canel()">重 置</view>
......@@ -90,12 +90,14 @@ export default {
total: 1,
page: 1,
limit: 10,
is_loading: false
is_loading: false,
loading: false
};
},
onReachBottom() {
if (this.is_loading) return;
this.page++;
this.loading=true;
this.getData();
},
onShow() {
......@@ -103,9 +105,10 @@ export default {
},
methods: {
getData() {
this.request(API.warehouseOperationList, 'POST', { page: this.page, limit: this.limit, erp_order_sn: this.erp_order_sn, begin_time: this.datetimerange[0], end_time: this.datetimerange[1] }, false).then(res => {
this.request(API.warehouseOperationList, 'POST', { page: this.page, limit: this.limit, erp_order_sn: this.erp_order_sn, begin_time: this.datetimerange[0], end_time: this.datetimerange[1] }, this.loading).then(res => {
if (res.err_code === 0) {
if (res.data.data.length > 0) {
this.is_loading = false;
this.warehouseOperation = this.warehouseOperation.concat(res.data.data);
this.total = res.data.total;
} else {
......@@ -134,8 +137,11 @@ export default {
filterChange() {
this.shade_flag = !this.shade_flag;
},
change(e) {
changeTimeRange(e) {
this.datetimerange = e;
this.total = 0;
this.page = 1;
this.warehouseOperation = [];
this.getData();
},
submit() {
......
......@@ -85,17 +85,21 @@ export default {
weonlt_id: '', //仓内作业列表ID
operation_img: [], //作业图片
actual_operation_num: [], //作业数量 来自 instructions_num
weondl_ids: [] //仓内作业详情ID
weondl_ids: [], //仓内作业详情ID,
noexebshowFalg: true //控制是否会触发生命周期
};
},
onLoad(options) {
this.weonlt_id = options.weonlt_id;
},
onShow() {
this.getData();
if (this.noexebshowFalg) {
this.getData();
}
},
methods: {
clickImg(img, index) {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
uni.previewImage({
current: index,
urls: img
......
<template>
<view class="deviceList">
<view class="device-box row verCenter bothSide">
<template v-if="status">
<view class="row verCenter">
<text class="iconfont icon-juxing7"></text>
<text class="t1">已连接设备: {{ deviceName }}</text>
</view>
</template>
<template v-else>
<view class="row verCenter">
<text class="iconfont icon-juxing7"></text>
<text class="t1">未连接设备</text>
</view>
</template>
<text class="close" v-if="status" @click="closeBLEConnection()">断开连接</text>
</view>
<view class="title row verCenter bothSide">
<text class="t1">搜索到蓝牙设备</text>
<view class="row verCenter" @click="refresh()">
<text class="iconfont icon-a-juxing12"></text>
<text class="t2">刷新</text>
</view>
</view>
<view class="list">
<view class="box row verCenter bothSide" v-for="(item, index) in list" :key="index" @click="connectChange(item.name, item.deviceId, index)">
<text class="t1">{{ item.name }}</text>
<text class="t2">连接</text>
</view>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {
status: false,
deviceName: '',
list: [],
isOpenBle: false,
deviceId: ''
};
},
onLoad() {
//在页面加载时候初始化蓝牙适配器
uni.openBluetoothAdapter({
success: e => {
console.log('初始化蓝牙成功:' + e.errMsg);
this.isOpenBle = true;
console.log(this.isOpenBle);
// 初始化完毕开始搜索
this.startBluetoothDeviceDiscovery();
},
fail: e => {
console.log('初始化蓝牙失败,错误码:' + (e.errCode || e.errMsg));
wx.showModal({
title: '提示',
content: '蓝牙初始化失败,请到设置打开蓝牙',
showCancel: false
});
}
});
},
methods: {
startBluetoothDeviceDiscovery() {
uni.showLoading({
title: '搜索蓝牙设备',
mask: true
});
//在页面显示的时候判断是都已经初始化完成蓝牙适配器若成功,则开始查找设备
let self = this;
setTimeout(function() {
if (self.isOpenBle) {
console.log('开始搜寻智能设备');
uni.startBluetoothDevicesDiscovery({
success: res => {
self.onBluetoothDeviceFound();
},
fail: res => {
uni.hideLoading();
console.log('查找设备失败!');
uni.showToast({
icon: 'none',
title: '查找设备失败!',
duration: 3000
});
}
});
} else {
console.log('未初始化蓝牙是配饰器:' + self.isOpenBle);
}
}, 300);
},
/**
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
console.log('监听寻找新设备');
// this.getBluetoothDevices();
uni.onBluetoothDeviceFound(el => {
console.log('开始监听寻找到新设备的事件');
this.getBluetoothDevices();
});
},
/**
* 获取在蓝牙模块生效期间所有已发现的蓝牙设备。包括已经和本机处于连接状态的设备。
*/
getBluetoothDevices() {
console.log('获取蓝牙设备');
uni.getBluetoothDevices({
success: res => {
console.log('获取蓝牙设备成功:' + res.errMsg);
console.log(res);
var devices = [];
var num = 0;
for (var i = 0; i < res.devices.length; i++) {
if (res.devices[i].name != '未知设备') {
devices[num] = res.devices[i];
num++;
}
}
this.list = devices;
if (this.list.length > 0) {
uni.hideLoading();
}
}
});
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
//成功找到对应蓝牙设备后 停止搜寻附近的蓝牙外围设备
let that = this;
uni.stopBluetoothDevicesDiscovery({
success(res) {
console.log('停止搜索', JSON.stringify(res.errMsg));
that.getBLEDeviceServices();
}
});
},
getBLEDeviceServices() {
//来获取蓝牙设备所有服务
uni.createBLEConnection({
deviceId: this.deviceId,
success: res => {
console.log('连接成功', JSON.stringify(res.errMsg));
this.status = true;
uni.hideLoading();
}
});
},
connectChange(name, deviceId) {
uni.showLoading({
title: '连接设备中'
});
uni.closeBLEConnection({
deviceId: this.deviceId,
success: res => {
console.log('断开蓝牙连接:', JSON.stringify(res.errMsg));
this.deviceName = name;
this.deviceId = deviceId;
uni.setStorageSync('device', { name: name, deviceId: deviceId });
this.stopBluetoothDevicesDiscovery();
}
});
},
refresh() {
uni.stopBluetoothDevicesDiscovery({
success: res => {
console.log('停止搜索', JSON.stringify(res.errMsg));
this.list = [];
this.startBluetoothDeviceDiscovery();
}
});
},
closeBLEConnection() {
uni.closeBLEConnection({
deviceId: this.deviceId,
success: res => {
console.log('断开蓝牙连接:', JSON.stringify(res.errMsg));
this.status = false;
this.deviceId = '';
this.deviceName = '';
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/tag/deviceList.scss';
</style>
No preview for this file type
......@@ -60,7 +60,8 @@ $uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 15px;
view,
text {
text,
input {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
......@@ -155,4 +156,4 @@ image {
font-size: 22rpx;
color: #6e767a;
}
}
\ No newline at end of file
}
......@@ -44,7 +44,23 @@ const API = {
/**
* 执行仓内作业
* */
execWarehouseOperation: API_BASE + '/supplywechatwms/execWarehouseOperation'
execWarehouseOperation: API_BASE + '/supplywechatwms/execWarehouseOperation',
/**
* 收货登记列表
* */
getCheckInList: API_BASE + '/supplywechatwms/getCheckInList',
/**
* 新增收货登记
* */
addCheckIn: API_BASE + '/supplywechatwms/addCheckIn',
/**
* 新增异常收货登记
* */
addUnusualCheckIn: API_BASE + '/supplywechatwms/addUnusualCheckIn',
/**
* 理货列表
* */
getGoodsArrangeData: API_BASE + '/supplywechatwms/getGoodsArrangeData'
}
......
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