Browse Source

物流页

master
tianyi 1 month ago
parent
commit
c5b212b92c
  1. 52
      package2/other/newLogisticsBill.vue

52
package2/other/newLogisticsBill.vue

@ -135,10 +135,13 @@
<view class="content"> <view class="content">
<view class="name-box" style="float: left;">到达站</view> <view class="name-box" style="float: left;">到达站</view>
<view style="width: 80%;float: left;"> <view style="width: 80%;float: left;">
<uni-data-select class="uni-data-select" :localdata="arrivalStationList" <uni-combox style="width: 60%;height: 76rpx !important;"
v-model="voiceData.arrivalStationId" placeholder="到达站" :clear="false" label=" "
@change="arrivalStationChange" style="width: 60%;"> v-model="voiceData.arrivalStationName"
</uni-data-select> :candidates="arrivalStationList1"
placeholder="请输入或选择到达站"
@input="arrivalStationChange"
></uni-combox>
</view> </view>
</view> </view>
<view class="content" style="min-height: 80rpx;"> <view class="content" style="min-height: 80rpx;">
@ -546,6 +549,7 @@
addressType: '', addressType: '',
isVoice: false, isVoice: false,
priceCurrent: 0, priceCurrent: 0,
arrivalStationList1:[],
priceItems: [{ priceItems: [{
value: 0, value: 0,
name: '否' name: '否'
@ -707,7 +711,9 @@
let remark = uni.getStorageSync('remark') let remark = uni.getStorageSync('remark')
this.shopRemark = remark.split('\n'); this.shopRemark = remark.split('\n');
} }
if(uni.getStorageSync('transCompany') =='1751797599075176448'){
this.voiceData.cost = 2
}
if (option.editData) { if (option.editData) {
this.isEdit = true this.isEdit = true
let editData = JSON.parse(option.editData) let editData = JSON.parse(option.editData)
@ -1143,6 +1149,7 @@
this.voiceData.landingFee = Number(res.data.result[i].landingFeeRules) this.voiceData.landingFee = Number(res.data.result[i].landingFeeRules)
this.voiceData.deliveryFee = res.data.result[i].deliveryFeeRules this.voiceData.deliveryFee = res.data.result[i].deliveryFeeRules
} }
this.arrivalStationList1.push(res.data.result[i].stationName)
} }
setTimeout(res1 => { setTimeout(res1 => {
@ -1271,7 +1278,7 @@
arrivalStationChange(e) { arrivalStationChange(e) {
for (let i = 0; i < this.arrivalStationList.length; i++) { for (let i = 0; i < this.arrivalStationList.length; i++) {
if (this.arrivalStationList[i].id == e) { if (this.arrivalStationList[i].stationName == e || this.arrivalStationList[i].id == e) {
this.voiceData.arrivalStationId = this.arrivalStationList[i].id this.voiceData.arrivalStationId = this.arrivalStationList[i].id
this.voiceData.arrivalStationName = this.arrivalStationList[i].stationName this.voiceData.arrivalStationName = this.arrivalStationList[i].stationName
this.voiceData.freight = (this.voiceData.weight * this.arrivalStationList[i].freightRules).toFixed( this.voiceData.freight = (this.voiceData.weight * this.arrivalStationList[i].freightRules).toFixed(
@ -2060,12 +2067,15 @@
if (this.isEdit != true) { if (this.isEdit != true) {
if(uni.getStorageSync('transCompany') == '1899370468356526080' || uni.getStorageSync('transCompany') == '1751796589518786560' || uni.getStorageSync('transCompany') == '1899371352842964992' || uni.getStorageSync('transCompany') == '1782981706819702784'){ if(uni.getStorageSync('transCompany') == '1899370468356526080' || uni.getStorageSync('transCompany') == '1751796589518786560' || uni.getStorageSync('transCompany') == '1899371352842964992' || uni.getStorageSync('transCompany') == '1782981706819702784' || uni.getStorageSync('transCompany') == '1751797599075176448'){
if(uni.getStorageSync('deviceId') != '' && uni.getStorageSync('deviceId') != undefined){ console.log('打印数据',uni.getStorageSync('deviceId'))
this.huoqufuwu(uni.getStorageSync('deviceId')) // if(uni.getStorageSync('deviceId') != '' && uni.getStorageSync('deviceId') != undefined){
}else{ // console.log('11111111111')
// this.huoqufuwu(uni.getStorageSync('deviceId'))
// }else{
// console.log('2222222')
this.handlePrintTap() this.handlePrintTap()
} // }
this.voiceData.orderNumber = res.data.result.orderNumber this.voiceData.orderNumber = res.data.result.orderNumber
}else{ }else{
this.clearData("1") this.clearData("1")
@ -2275,14 +2285,15 @@
huoqufuwu(deviceId) { huoqufuwu(deviceId) {
let that = this; let that = this;
// //
wx.getBLEDeviceServices({ //666 uni.getBLEDeviceServices({ //666
deviceId: deviceId, // deviceId deviceId: deviceId, // deviceId
success: (res5) => { success: (res5) => {
console.log('333333333')
that.duxietezhengzhi(deviceId, res5) that.duxietezhengzhi(deviceId, res5)
}, },
fail: (res) => { fail: (res) => {
that.tui.toast('连接失败,请重启蓝牙或删除小程序重新进入-4', res) that.tui.toast('连接失败,请重启蓝牙或删除小程序重新进入-4', res)
console.log('777777777',res)
wx.closeBLEConnection({ wx.closeBLEConnection({
deviceId: deviceId, deviceId: deviceId,
success(res2) { success(res2) {
@ -2308,7 +2319,7 @@
deviceId: deviceId, // deviceId deviceId: deviceId, // deviceId
serviceId: res5.services[0].uuid, // serviceId: res5.services[0].uuid, //
success: (res6) => { success: (res6) => {
console.log('444444444')
for (let i = 0; i < res6.characteristics.length; i++) { for (let i = 0; i < res6.characteristics.length; i++) {
let item = res6.characteristics[i] let item = res6.characteristics[i]
that.startNoticeBle(deviceId, res5.services[0].uuid, res6.characteristics[2].uuid) that.startNoticeBle(deviceId, res5.services[0].uuid, res6.characteristics[2].uuid)
@ -2364,6 +2375,9 @@
uni.hideLoading() uni.hideLoading()
that.clearData('') that.clearData('')
that.$forceUpdate() that.$forceUpdate()
uni.closeBLEConnection({
deviceId: uni.getStorageSync('deviceId')
})
}) })
}, },
clearData(type){ clearData(type){
@ -2417,6 +2431,9 @@
receivingUserId: '', // id receivingUserId: '', // id
receivingUserName: '' // receivingUserName: '' //
} }
if(uni.getStorageSync('transCompany') =='1751797599075176448'){
this.voiceData.cost = 2
}
that.$forceUpdate() that.$forceUpdate()
}, },
getPrintByte(data) { getPrintByte(data) {
@ -2636,6 +2653,10 @@
jiesuan = '提付' jiesuan = '提付'
} }
strCmd1 += blesdk.addCPCLText('30', '290', '24', '0', '0', ('结算方式:' + jiesuan)) strCmd1 += blesdk.addCPCLText('30', '290', '24', '0', '0', ('结算方式:' + jiesuan))
if(uni.getStorageSync('transCompany') != '1751796589518786560'){
strCmd1 += blesdk.addCPCLText('300', '290', '24', '0', '0', ('总运费:' + that.getPrintByte(Number(that.voiceDataPrint.freight) + Number(that.voiceDataPrint.cost)) + '元'))
}
}else{ }else{
let beginWidth = 0 let beginWidth = 0
let beginNum = 0 let beginNum = 0
@ -3207,4 +3228,7 @@
border: 1px solid #FFE4E1; border: 1px solid #FFE4E1;
color: #87CEFA; color: #87CEFA;
} }
.uni-combox{
height: 76rpx !important;
}
</style> </style>
Loading…
Cancel
Save