Browse Source

修改bug

master
wangfukang 3 years ago
parent
commit
5ac25d333b
  1. 38
      pages/index/addHangOrder.vue
  2. 2
      pages/index/downarrears.vue
  3. 14
      pages/inventory/addinventory.vue
  4. 2
      pages/inventory/goodsList1.vue
  5. 6
      pages/login/login.vue

38
pages/index/addHangOrder.vue

@ -64,9 +64,12 @@
<text style="color:red;font-size:22rpx;">*长按“语音”按钮录入,系统将自动识别</text> <text style="color:red;font-size:22rpx;">*长按“语音”按钮录入,系统将自动识别</text>
</view> </view>
<view class="popup-bottom"> <view class="popup-bottom">
<view class="popup-btn" @touchstart="kaishi" @touchend="jieshu">语音</view> <view class="popup-btn" @tap="clearText">清空</view>
<view class="popup-btn" @tap="setDetail">确认</view> <view class="popup-btn" @tap="setDetail">确认</view>
</view> </view>
</view>
<view class="voice-btn" @touchstart="kaishi" @touchend="jieshu">
<img src="/static/images/maikefeng.png" style="width: 80%;height: 80%;margin: 10%;" alt="">
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
@ -273,17 +276,22 @@
manager.stop() manager.stop()
//有新的识别内容返回,则会调用此事件 //有新的识别内容返回,则会调用此事件
manager.onRecognize = (res) => { manager.onRecognize = (res) => {
this.voiceText = res.result // this.voiceText = res.result
} }
manager.onStart = function(res) { manager.onStart = function(res) {
this.voiceText = "onStart:" + res.msg + "正在录音" // this.voiceText = "onStart:" + res.msg + "正在录音"
} }
// 识别结束事件 // 识别结束事件
manager.onStop = (res) => { manager.onStop = (res) => {
this.voiceText = res.result if (res.result == '') {
if (res.result == '') { this.showRecordEmptyTip()
this.showRecordEmptyTip() return
return }
if(this.voiceText == ''){
this.voiceText = res.result
}else{
res.result = '\n' + res.result
this.voiceText += res.result
} }
} }
@ -508,6 +516,10 @@
this.tui.toast(res.message) this.tui.toast(res.message)
} }
}).catch((res) => {}) }).catch((res) => {})
},
//清空语音输入的文字
clearText(){
this.voiceText = ''
}, },
//查看大图 //查看大图
largeImg(img) { largeImg(img) {
@ -639,6 +651,7 @@
obj.createByName = item.createByName obj.createByName = item.createByName
dataList.push(obj) dataList.push(obj)
} }
console.log(dataList);
uni.setStorageSync('carList1', JSON.stringify(dataList)) uni.setStorageSync('carList1', JSON.stringify(dataList))
uni.setStorageSync('khName', '') uni.setStorageSync('khName', '')
} }
@ -1000,5 +1013,14 @@
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
border-top: 1px solid #eee; border-top: 1px solid #eee;
color: #fff; color: #fff;
}
.voice-btn{
position: absolute;
bottom: -300rpx;
left: 30%;
width: 200rpx;
height: 200rpx;
background: #eee;
border-radius: 50%;
} }
</style> </style>

2
pages/index/downarrears.vue

@ -4,7 +4,7 @@
<view class="ulList" v-if="list.length > 0"> <view class="ulList" v-if="list.length > 0">
<ul> <ul>
<li v-for="item in list" @tap="returnPrice(item)"> <li v-for="item in list" @tap="returnPrice(item)">
<uni-card :title="item.companyName == null ?'暂无':item.companyName" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'订单金额:¥'+(item.totalAmount == null ?'暂无':item.totalAmount)" <uni-card :title="item.userName == null ?'暂无':item.userName" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'订单金额:¥'+(item.totalAmount == null ?'暂无':item.totalAmount)"
thumbnail="/static/images/dingdan/dd1.png"> thumbnail="/static/images/dingdan/dd1.png">
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createByName == null ?'暂无':item.createByName}}</view> <view class="uni-body"><text class="cardText">销售员:</text> {{item.createByName == null ?'暂无':item.createByName}}</view>
<view class="uni-body"> <text class="cardText"> 销售总额:</text> <text class="priceText"> <view class="uni-body"> <text class="cardText"> 销售总额:</text> <text class="priceText">

14
pages/inventory/addinventory.vue

@ -578,12 +578,16 @@
}) })
return return
}else{ }else{
if(this.storageType==0 && this.shouldPay == 0){ if(this.storageType==0){
uni.showToast({ this.carList.forEach(function(value, key) {
title: "管理员必须维护价格!", if(value.purchasePrice == '' || value.purchasePrice == 0){
icon: 'none' uni.showToast({
title: value.productName + "的价格必须维护!",
icon: 'none'
})
throw new Error("End");
}
}) })
return
} }
} }
let that = this; let that = this;

2
pages/inventory/goodsList1.vue

@ -1076,7 +1076,7 @@
otherExpense: this.otherExpense == '' ? 0 : this.otherExpense, //其他费用 otherExpense: this.otherExpense == '' ? 0 : this.otherExpense, //其他费用
shareAddress: this.pbAddress, shareAddress: this.pbAddress,
transCompany: this.wlName.shippingMethodId || this.wlName.id, transCompany: this.wlName.shippingMethodId || this.wlName.id,
companyName: this.wlName.companyName, companyName: this.wlName.shippingMethod || this.wlName.companyName,
}, },
saleDetailList: [] saleDetailList: []
} }

6
pages/login/login.vue

@ -76,11 +76,11 @@
export default { export default {
data() { data() {
return { return {
// mobile: '15630117759', mobile: '',
username: '15101147760', username: '',
// username: '15630117759', // username: '15630117759',
code: '', code: '',
password: '123456', password: '',
// password: '19950123kang', // password: '19950123kang',
loginWay: true, //true账号密码登录 false验证码登录 loginWay: true, //true账号密码登录 false验证码登录
captchaImg: '', captchaImg: '',

Loading…
Cancel
Save