From 372b5a0df938f843f98029a07311120ae23a86d3 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 29 七月 2025 09:48:10 +0800
Subject: [PATCH] 优化页面呈现效果
---
pages.json | 2
pages/index/login.vue | 432 +++++++++++++++++++++++++-----------------
pages/tiaomadaying/tiaomadaying.vue | 125 +++++++-----
plugins/BluetoothTool.js | 7
4 files changed, 337 insertions(+), 229 deletions(-)
diff --git a/pages.json b/pages.json
index 7551cc6..e09403f 100644
--- a/pages.json
+++ b/pages.json
@@ -502,7 +502,7 @@
{
"path": "pages/tiaomadaying/tiaomadaying",
"style": {
- "navigationBarTitleText": "鏉ユ枡鏉$爜鎵撳嵃"
+ "navigationBarTitleText": "閲囪喘鏉$爜鎵撳嵃"
}
},
{
diff --git a/pages/index/login.vue b/pages/index/login.vue
index de80376..82c8054 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -8,7 +8,7 @@
<image src="../../static/logo.png" mode=""></image>
</view>
<view class="login">
-<!-- <view class="item">
+ <!-- <view class="item">
<view class="left">褰撳墠甯愬锛�</view>
<picker :range="arrayDataBases" :value="DataBases" @change="DataBasesChange">
<view class="right" style="display: flex;align-items: center;">
@@ -22,7 +22,8 @@
<picker :range="arrayOrganization" :value="Organization" @change="OrganizationChange">
<view class="right" style="display: flex;align-items: center;">
<input type="text" disabled v-model="Organization" placeholder="璇烽�夋嫨褰撳墠缁勭粐">
- <uni-icons type="forward" color="#808080" style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
+ <uni-icons type="forward" color="#808080"
+ style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
</view>
</picker>
</view>
@@ -33,161 +34,216 @@
</view>
</view>
<view class="item">
- <view class="left">瀵� 鐮侊細</view>
+ <view class="left">瀵� 鐮侊細</view>
<view class="right">
<input type="password" v-model="PassWord">
</view>
</view>
-<!-- <view class="api">
+ <!-- <view class="api">
褰撳墠鏈嶅姟鍣ㄥ湴鍧�锛歿{serverUrl}}
</view>
<view class="apibtn" @tap="changeApi=true">淇敼鏈嶅姟鍣ㄥ湴鍧�</view> -->
</view>
</view>
- <hFormAlert v-if="changeApi" placeholder="璇疯緭鍏ユ湇鍔″櫒鍦板潃" @confirm="confirm" @cancel="cancel"></hFormAlert>
-
+ <!-- <hFormAlert v-if="changeApi" placeholder="璇疯緭鍏ユ湇鍔″櫒鍦板潃" @confirm="confirm" @cancel="cancel"></hFormAlert> -->
+ <uni-popup ref="popup" type="center">
+ <uni-popup-dialog title="鏈嶅姟鍣ㄨ缃�" mode="input" @confirm="confirmHandler">
+ <view class="popup-content">
+ <picker class="pop-item" :range="arrayServerOrganization" :value="serverOrganization"
+ @change="serverOrganizationChange">
+ <view class="right" style="display: flex;align-items: center;">
+ <input type="text" disabled v-model="serverOrganization" placeholder="璇烽�夋嫨褰撳墠缁勭粐">
+ <uni-icons type="forward" color="#808080"
+ style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
+ </view>
+ </picker>
+ <view class="pop-item">
+ <input type="text" :value="serverUrlCache" placeholder="璇疯緭鍏ユ湇鍔″櫒鍦板潃" />
+ </view>
+ </view>
+ </uni-popup-dialog>
+ </uni-popup>
+
<view class="btn" @tap="submit">鐧� 褰�</view>
- <view class="btn apibtn" @tap="changeApi=true">鏈嶅姟鍣ㄨ缃�</view>
+ <!-- <view class="btn apibtn" @tap="changeApi=true">鏈嶅姟鍣ㄨ缃�</view> -->
+ <view class="btn apibtn" @click="openServerSettingHandler">鏈嶅姟鍣ㄨ缃�</view>
</view>
</view>
</template>
<script>
- import { setLoginData,setUserInfo} from "@/utils/auth.js";
+ import {
+ setLoginData,
+ setUserInfo
+ } from "@/utils/auth.js";
import hFormAlert from '@/components/h-form-alert/h-form-alert.vue';
export default {
components: {
hFormAlert
},
- data() {
- return {
- arrayDataBases:[],
- DataBases:'',
-
- arrayOrganization:[],
- Organization:'',
- HOrgNameList:[],
-
- HOrgName:'',
- UserName:'',//admin 001
- PassWord:'',//123456
- changeApi:false,
- serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
- }
- },
+ data() {
+ return {
+ arrayDataBases: [],
+ DataBases: '',
+
+ arrayServerOrganization: ["娴欐睙鏅轰簯杩堟��", "娓╁窞娴疯瘹"],
+ arrayServerOrganizationValues: [
+ 'http://47.96.97.237/API/',
+ 'http://122.228.39.234:7177/API/'
+ ],
+ serverOrganization: '',
+ arrayOrganization: [],
+ Organization: '',
+ HOrgNameList: [],
+
+ HOrgName: '',
+ UserName: '', //admin 001
+ PassWord: '', //123456
+ changeApi: false,
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ serverUrlCache: '',
+ }
+ },
onLoad() {
- var logindata = uni.getStorageSync('loginData')||''
+ var logindata = uni.getStorageSync('loginData') || ''
// console.log(logindata)
- if(logindata){
+ if (logindata) {
logindata = JSON.parse(logindata)
this.HOrgName = logindata.HOrgName
this.Organization = logindata.Organization
this.UserName = logindata.UserName
this.PassWord = logindata.PassWord
}
+
+ this.serverUrlCache = this.serverUrl
+ console.log('this.serverUrlCache: ',this.serverUrlCache);
+ let index = this.arrayServerOrganizationValues.findIndex((e) => {
+ return e == this.serverUrlCache
+ })
+ if (index == -1) {
+ index = 0
+ }
+ this.serverOrganization = this.arrayServerOrganization[index]
this.getOrganization()
- // this.getDataBases()
+ this.getDataBases()
},
- methods: {
- confirm(e){
+ methods: {
+ confirm(e) {
console.log(e)
- uni.setStorageSync('serverUrl',e)
+ uni.setStorageSync('serverUrl', e)
this.serverUrl = e
this.changeApi = false
this.getOrganization()
},
- cancel(){
+ confirmHandler() {
+ uni.setStorageSync('serverUrl', this.serverUrlCache)
+ this.serverUrl = this.serverUrlCache
+ // this.changeApi = false
+ this.getOrganization()
+ },
+ cancel() {
this.changeApi = false
},
- getDataBases(){
+ openServerSettingHandler() {
+ this.$refs.popup.open()
+ },
+ getDataBases() {
uni.request({
- url: this.serverUrl + '/Web/GetDataBases',
- success: (result) => {
+ url: this.serverUrl + '/Web/GetDataBases',
+ success: (result) => {
console.log(result);
if (result.count == 1) {
- for(var i=0;i<res.data.data.length;i++){
+ for (var i = 0; i < res.data.data.length; i++) {
this.arrayDataBases[i] = result.data.data[i].name;
}
}
console.log(this.arrayDataBases);
this.$forceUpdate();
- },
+ },
fail: (res) => {
- console.log(res);
+ console.log(res);
},
});
},
- DataBasesChange(e){
+ DataBasesChange(e) {
console.log(e.detail.value)
this.DataBases = this.arrayDataBases[e.detail.value]
uni.setStorageSync('DataBases', this.DataBases);
},
-
- getOrganization(){
+
+ getOrganization() {
uni.request({
- url: this.serverUrl + '/Web/GetOrganizations',
- success: (res) => {
- console.log(res.data.data);
- for(var i=0;i<res.data.data.length;i++){
+ url: this.serverUrl + '/Web/GetOrganizations',
+ success: (res) => {
+ console.log(res.data.data);
+ for (var i = 0; i < res.data.data.length; i++) {
this.arrayOrganization[i] = res.data.data[i].Name
this.HOrgNameList[i] = res.data.data[i].ID
}
+ this.Organization = res.data.data[0].Name
+ this.HOrgName = res.data.data[0].ID
this.$forceUpdate();
- },
+ },
fail: (res) => {
- console.log(res);
+ console.log(res);
uni.showToast({
- title:'鑾峰彇缁勭粐澶辫触,璇锋鏌ユ湇鍔″櫒鍦板潃',
- icon:'none'
+ title: '鑾峰彇缁勭粐澶辫触,璇锋鏌ユ湇鍔″櫒鍦板潃',
+ icon: 'none'
})
},
});
},
- OrganizationChange(e){
+ OrganizationChange(e) {
// console.log(e.detail.value)
this.Organization = this.arrayOrganization[e.detail.value]
this.HOrgName = this.HOrgNameList[e.detail.value]
},
- submit(){
- if(!this.Organization){
+ serverOrganizationChange(e) {
+ // console.log(e.detail.value)
+ let index = e.detail.value
+ this.serverOrganization = this.arrayServerOrganization[index]
+ this.serverUrlCache = this.arrayServerOrganizationValues[index]
+ },
+ submit() {
+ if (!this.Organization) {
uni.showToast({
- title:'璇烽�夋嫨缁勭粐',
- icon:'none'
+ title: '璇烽�夋嫨缁勭粐',
+ icon: 'none'
})
- }else if(!this.UserName){
+ } else if (!this.UserName) {
uni.showToast({
- title:'璇疯緭鍏ョ敤鎴峰悕',
- icon:'none'
+ title: '璇疯緭鍏ョ敤鎴峰悕',
+ icon: 'none'
})
- }else if(!this.PassWord){
+ } else if (!this.PassWord) {
uni.showToast({
- title:'璇疯緭鍏ュ瘑鐮�',
- icon:'none'
+ title: '璇疯緭鍏ュ瘑鐮�',
+ icon: 'none'
})
- }else{
+ } else {
uni.showLoading({
- title:'鐧诲綍涓�...',
- mask:true
+ title: '鐧诲綍涓�...',
+ mask: true
})
var data = {
UserName: this.UserName,
- PassWord: this.PassWord,
+ PassWord: this.PassWord,
HOrgName: this.HOrgName,
Organization: this.Organization
}
uni.setStorageSync('loginData', JSON.stringify(data));
uni.request({
- url: this.serverUrl + '/Web/GetUser',
- method:'GET',
- data:data,
+ url: this.serverUrl + '/Web/GetUser',
+ method: 'GET',
+ data: data,
success: (res) => {
console.log(res)
uni.hideLoading()
uni.showToast({
- title:res.data.Message,
- icon:'none'
+ title: res.data.Message,
+ icon: 'none'
})
- if(res.data.count == 1){
+ if (res.data.count == 1) {
setLoginData(data)
setUserInfo(res.data.data[0])
uni.setStorageSync('HUserName', res.data.data[0].Czymc);
@@ -196,9 +252,9 @@
uni.setStorageSync('login', "login");
uni.setStorageSync('Organization', this.Organization);
uni.setStorageSync('OrganizationID', this.HOrgName);
-
+
uni.reLaunch({
- url:'/pages/index/index'
+ url: '/pages/index/index'
})
}
},
@@ -206,125 +262,155 @@
console.log(res);
uni.hideLoading()
uni.showToast({
- title:'鎺ュ彛璇锋眰澶辫触',
- icon:'none'
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
})
},
});
}
}
- }
+ }
}
</script>
<style lang="scss" scoped>
-.bg-img{
- position: fixed;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- z-index: -1;
-}
-.container{
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- .title{
- margin-top: 174rpx;
- font-size: 47rpx;
- font-weight: bold;
- color: #FFFFFF;
+ .bg-img {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ z-index: -1;
}
- .box{
- width: 682rpx;
- position: relative;
- top: 120rpx;
+
+ .container {
+ width: 100%;
+ height: 100%;
display: flex;
+ flex-direction: column;
+ align-items: center;
justify-content: center;
- .logo{
- width: 155rpx;
- height: 155rpx;
- padding: 10rpx;
- position: absolute;
- z-index: 9;
- background-color: rgba(255, 255, 255, 0.5);
- border-radius: 100%;
- image{
- width: 100%;
- height: 100%;
- border-radius: 100%;
- background-color: #f0f3f7;
- }
+
+ .title {
+ margin-top: 174rpx;
+ font-size: 47rpx;
+ font-weight: bold;
+ color: #FFFFFF;
}
- .login{
- width: 100%;
- height: 480rpx;
- position: absolute;
- top: 90rpx;
- z-index: 0;
- background: #FFFFFF;
- border-radius: 25rpx 0 25rpx 0;
- box-shadow: 0 6rpx 24rpx 8rpx rgba(21, 99, 210, 0.14);
- padding-top: 160rpx;
- .item{
- display: flex;
- align-items: center;
- justify-content: flex-end;
- margin-right: 38rpx;
- margin-bottom: 70rpx;
- .left{
- font-size: 34rpx;
- font-weight: 400;
- color: #3C3C3C;
+
+ .box {
+ width: 682rpx;
+ position: relative;
+ top: 120rpx;
+ display: flex;
+ justify-content: center;
+
+ .logo {
+ width: 155rpx;
+ height: 155rpx;
+ padding: 10rpx;
+ position: absolute;
+ z-index: 9;
+ background-color: rgba(255, 255, 255, 0.5);
+ border-radius: 100%;
+
+ image {
+ width: 100%;
+ height: 100%;
+ border-radius: 100%;
+ background-color: #f0f3f7;
}
- .right{
- width: 441rpx;
- height: 68rpx;
- background: #EBEBEB;
- border-radius: 10rpx;
- input{
- height: 100%;
- padding: 0 30rpx;
- font-size: 30rpx;
+ }
+
+ .login {
+ width: 100%;
+ height: 480rpx;
+ position: absolute;
+ top: 90rpx;
+ z-index: 0;
+ background: #FFFFFF;
+ border-radius: 25rpx 0 25rpx 0;
+ box-shadow: 0 6rpx 24rpx 8rpx rgba(21, 99, 210, 0.14);
+ padding-top: 160rpx;
+
+ .item {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ margin-right: 38rpx;
+ margin-bottom: 70rpx;
+
+ .left {
+ font-size: 34rpx;
+ font-weight: 400;
+ color: #3C3C3C;
+ }
+
+ .right {
+ width: 441rpx;
+ height: 68rpx;
+ background: #EBEBEB;
+ border-radius: 10rpx;
+
+ input {
+ height: 100%;
+ padding: 0 30rpx;
+ font-size: 30rpx;
+ }
}
}
+
+ // .api{
+ // margin-left: 30rpx;
+ // font-size: 27rpx;
+ // color: #888;
+ // }
+ // .apibtn{
+ // text-align: center;
+ // font-size: 27rpx;
+ // margin-top: 14rpx;
+ // color: #066fb8;
+ // text-decoration: underline; /* 娣诲姞涓嬪垝绾� */
+ // font-style: italic; /* 灏嗗瓧浣撳彉涓烘枩浣� */
+ // }
}
- // .api{
- // margin-left: 30rpx;
- // font-size: 27rpx;
- // color: #888;
- // }
- // .apibtn{
- // text-align: center;
- // font-size: 27rpx;
- // margin-top: 14rpx;
- // color: #066fb8;
- // text-decoration: underline; /* 娣诲姞涓嬪垝绾� */
- // font-style: italic; /* 灏嗗瓧浣撳彉涓烘枩浣� */
- // }
+ }
+
+ .btn {
+ width: 540rpx;
+ height: 92rpx;
+ line-height: 92rpx;
+ margin-top: 940rpx;
+ background: #78CEFD;
+ box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(120, 206, 253, 0.3);
+ border-radius: 10rpx;
+ font-weight: 400;
+ color: #FEFEFE;
+ text-align: center;
+ font-size: 36rpx;
+ }
+
+ .apibtn {
+ margin-top: 50rpx;
+ background: #eec18e;
+ box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(253, 186, 118, 0.3);
}
}
- .btn{
- width: 540rpx;
- height: 92rpx;
- line-height: 92rpx;
- margin-top: 940rpx;
- background: #78CEFD;
- box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(120,206,253,0.3);
- border-radius: 10rpx;
- font-weight: 400;
- color: #FEFEFE;
- text-align: center;
- font-size: 36rpx;
+
+ .popup-content {
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ gap: 30rpx;
+
+ .pop-item {
+ border: #EBEBEB 2rpx solid;
+ border-radius: 10rpx;
+ padding: 14rpx 8rpx;
+ }
+
+ >picker {
+ background-color: #EBEBEB;
+ }
}
- .apibtn{
- margin-top: 50rpx;
- background: #eec18e;
- box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(253, 186, 118, 0.3);
- }
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/tiaomadaying/tiaomadaying.vue b/pages/tiaomadaying/tiaomadaying.vue
index 5692644..b63747d 100644
--- a/pages/tiaomadaying/tiaomadaying.vue
+++ b/pages/tiaomadaying/tiaomadaying.vue
@@ -6,7 +6,8 @@
<view class="item">
<view class="left">鏉$爜缂栧彿锛�</view>
<view class="right">
- <input name="HBarCode" v-model="lailiaoInfo.barCodeNo" placeholder="璇锋壂鎻忔潵鏂欐潯鐮�" />
+ <input name="HBarCode" v-model="lailiaoInfo.barCodeNo"
+ placeholder="璇锋壂鎻忓晢鍝佹潯鐮�" />
</view>
<view>
<uni-icons type="scan"
@@ -77,7 +78,7 @@
</view>
</view>
<view class="operation-zone">
- <button class="btn-c" :disabled="buttonStatus.btn1 == false" @click="GenereateBarCode">鐢熸垚</button>
+ <!-- <button class="btn-c" @click="GenereateBarCode">鐢熸垚</button> -->
<button class="btn-c" :disabled="buttonStatus.btn2 == false" @click="print">鎵撳嵃</button>
<view></view>
<button class="btn-c" @click="setClearLailiaoInfo">鏂板</button>
@@ -278,29 +279,42 @@
// await this.$nextTick(() => {
// this.$refs.labelPrinter.execPrint()
// })
-
+// T 24 0 300 280 璁″垝璺熻釜鍙�: ${this.lailiaoInfo.HMTONo || ''}
this.printInfo = `! 0 200 200 400 1
PAGE-WIDTH 608
SETQRVER 3
-B QR 500 30 M 2 U 3
-LA,${this.generatedBarCode}
+B QR 440 30 M 4 U 6
+LA,${this.lailiaoInfo.barCodeNo}
ENDQR
-T 24 0 30 30 渚涘簲鍟�: ${this.lailiaoInfo.HSupName}
-T 24 0 30 80 渚涘簲鍟嗘枡鍙�:
-T 24 0 30 130 鐗╂枡缂栫爜: ${this.lailiaoInfo.HMaterName}
-T 24 0 30 180 鐗╂枡鍒嗙粍:
-T 24 0 300 180 瑙勬牸鍨嬪彿: ${this.lailiaoInfo.HMaterModel}
-T 24 0 30 230 鏁伴噺: ${this.lailiaoInfo.HQty}
-T 24 0 300 230 鏃ユ湡:
-T 24 0 30 280 妫�楠屽憳:
-T 24 0 300 280 璁″垝璺熻釜鍙�: ${this.lailiaoInfo.HMTONo || ''}
-T 24 0 30 330 妫�楠岀粨鏋�:
+T 24 0 10 30 渚涘簲鍟�: ${this.lailiaoInfo.HSupName}
+T 24 0 10 55 (eng)
+T 24 0 10 80 渚涘簲鍟嗘枡鍙�: ${this.lailiaoInfo.HMaterNumber}
+T 24 0 10 105 (eng)
+T 24 0 10 130 鐗╂枡鍚嶇О: ${this.lailiaoInfo.HMaterName}
+T 24 0 5 155 (eng)
+T 24 0 5 180 鍒嗙粍: ${this.lailiaoInfo.HBatchNo}
+T 24 0 5 205 (eng)
+T 24 0 300 180 瑙勬牸: ${this.lailiaoInfo.HMaterModel}
+T 24 0 300 205 (eng)
+T 24 0 10 230 鏁伴噺: ${this.lailiaoInfo.HQty} (${this.lailiaoInfo.HPcsName})
+T 24 0 5 255 (eng)
+T 24 0 300 230 鏃ユ湡: ${this.lailiaoInfo.HDate}
+T 24 0 300 255 (eng)
+T 24 0 5 280 妫�楠屽憳:
+T 24 0 5 305 (eng)
+T 24 0 300 280 閲囪喘鍗曞彿: ${this.lailiaoInfo.HBillNo || ''}
+T 24 0 300 305 (eng)
+T 24 0 5 330 妫�楠岀粨鏋�:
+T 24 0 5 355 (eng)
BOX 260 330 280 350 4
T 24 0 290 330 鍚堟牸
+T 24 0 290 355 (eng)
BOX 360 330 380 350 4
T 24 0 390 330 涓嶅悎鏍�
+T 24 0 390 355 (eng)
BOX 480 330 500 350 4
T 24 0 510 330 鐗归噰
+T 24 0 510 355 (eng)
FORM
PRINT`
@@ -319,6 +333,7 @@
})
}
let d = data[row - 1]
+ console.log('鏉$爜鎺ユ敹鏁版嵁: ',d)
this.lailiaoInfo = Object.assign(this.lailiaoInfo, {
HMaterNumber: d['鐗╂枡缂栫爜'],
HMaterName: d['鐗╂枡鍚嶇О'],
@@ -327,13 +342,15 @@
HQty: d['鏁伴噺'],
HMinQty: d['鏁伴噺'],
HBQty: d['鏁伴噺'],
+ HDate: d['鏃ユ湡'],
HSupID: d['HSupID'],
HSupName: d['渚涘簲鍟�'],
HSupNameShort: d['渚涘簲鍟�'],
- HMTONo: d['璁㈠崟璺熻釜鍙�'],
+ HMTONo: d['璁″垝璺熻釜鍙�'],
HMainID: d['linterid'],
HSubID: d['HEntryID'],
HMaterID: d['HMaterID'],
+ HPcsName: d['璁¢噺鍗曚綅']
})
},
setClearLailiaoInfo() {
@@ -370,6 +387,7 @@
console.log('鏉$爜鍐呭锛�' + res.result);
this.lailiaoInfo.barCodeNo = res.result;
if (res.result.includes("@") === false) {
+ this.buttonStatus.btn2 = false
return uni.showToast({
icon: 'none',
title: '鏉$爜鏍煎紡閿欒锛岃閲嶆柊鎵弿...'
@@ -396,10 +414,11 @@
} = res.data
if (count > 0) {
this.setLailiaoInfo(data, Row)
+ this.buttonStatus.btn2 = true
}
},
(error) => {
-
+ this.buttonStatus.btn2 = false
}
)
@@ -416,49 +435,49 @@
//鑾峰彇閫夋嫨鐨勫伐鍘備唬鐮�
let CampanyName = "xxx";
//鑾峰彇閫夋嫨鐨勬簮鍗曠被鍨�
- let HSourceBillType = "鏉ユ枡閫氱煡鍗�";
+ let HSourceBillType = "閲囪喘璁㈠崟";
//鑾峰彇閫夋嫨鐨勬潯鐮佺被鍨�
- let HSelectBarCodeType = "鍞竴鏉$爜";
+ let HSelectBarCodeType = "鍝佺鏉$爜";
//鑾峰彇褰撳墠鐧诲綍浜哄憳
let UserName = uni.getStorageSync('HUserName');
let sMainSub = sMainStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' +
CampanyName + ';' + UserName;
- CommonUtils.doRequest(
- "/Sc_BarCode/Sub_SaveBill", {
- msg: sMainSub,
- CampanyName: CampanyName
- },
- (res) => {
- console.log(res)
- let {
- data,
- count,
- Message
- } = res.data
- if (count > 0) {
- this.buttonStatus = {
- btn1: false,
- btn2: true
- }
- this.generatedBarCode = data[0]['鏉$爜缂栧彿']
- console.log(this.generatedBarCode)
- uni.showToast({
- icon: 'none',
- title: Message
- })
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
- }
- },
- (err) => {
+ // CommonUtils.doRequest(
+ // "/Sc_BarCode/Sub_SaveBill", {
+ // msg: sMainSub,
+ // CampanyName: CampanyName
+ // },
+ // (res) => {
+ // console.log(res)
+ // let {
+ // data,
+ // count,
+ // Message
+ // } = res.data
+ // if (count > 0) {
+ // this.buttonStatus = {
+ // btn1: false,
+ // btn2: true
+ // }
+ // this.generatedBarCode = data[0]['鏉$爜缂栧彿']
+ // console.log(this.generatedBarCode)
+ // uni.showToast({
+ // icon: 'none',
+ // title: Message
+ // })
+ // } else {
+ // uni.showToast({
+ // icon: 'none',
+ // title: Message
+ // })
+ // }
+ // },
+ // (err) => {
- },
- "POST"
- )
+ // },
+ // "POST"
+ // )
},
exit() {
uni.navigateBack()
diff --git a/plugins/BluetoothTool.js b/plugins/BluetoothTool.js
index d376add..6ba8f37 100644
--- a/plugins/BluetoothTool.js
+++ b/plugins/BluetoothTool.js
@@ -181,15 +181,17 @@
//6.0浠ュ悗鐨勫鏋滈渶瑕佸埄鐢ㄦ湰鏈烘煡鎵惧懆鍥寸殑wifi鍜岃摑鐗欒澶�, 鐢宠鏉冮檺
if(Build.VERSION.SDK_INT >= 6.0){
-
+ console.log('Build.VERSION.SDK_INT: ',Build.VERSION.SDK_INT);
}
let options = this.options
+
btFindReceiver = plus.android.implements("io.dcloud.android.content.BroadcastReceiver", {
"onReceive": function(context, intent) {
plus.android.importClass(context);
plus.android.importClass(intent);
let action = intent.getAction();
-
+
+ console.log(BluetoothDevice)
if(BluetoothDevice.ACTION_FOUND == action) { // 鎵惧埌璁惧
let device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
let newDevice = {
@@ -204,6 +206,7 @@
}
}
});
+
let filter = new IntentFilter();
filter.addAction(BluetoothDevice.ACTION_FOUND);
filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
--
Gitblit v1.9.1