|
|
@@ -71,8 +71,8 @@
|
|
|
<uni-forms-item name="tyreNo" label="胎号" required>
|
|
|
<view style="display: flex;align-items: center;">
|
|
|
<uni-easyinput v-model="item.tyreNo" class="right-align"
|
|
|
- placeholder-class="placeholder-right" :placeholder="form.status>0?' ':'请输入胎号'" :inputBorder="false"
|
|
|
- :disabled="form.status>0" :clearable="false"
|
|
|
+ placeholder-class="placeholder-right" :placeholder="form.status>0?' ':'请输入胎号'"
|
|
|
+ :inputBorder="false" :disabled="form.status>0" :clearable="false"
|
|
|
@change="getMaterialDetail($event,activeTab)"></uni-easyinput>
|
|
|
<uni-icons v-if="!form.status>0" type="scan" size="24" color='#03803B'
|
|
|
@click="allClick('识别胎号',activeTab)"></uni-icons>
|
|
|
@@ -135,7 +135,7 @@
|
|
|
:autoChange="true"></u-keyboard>
|
|
|
<view class="nav-bottom-height">
|
|
|
</view>
|
|
|
- <view class="goods-nav-bottom">
|
|
|
+ <view v-show="!keyboardShow" class="goods-nav-bottom">
|
|
|
<uni-goods-nav v-if="!form.id" :fill="true" :options="[]" :buttonGroup="buttonGroup"
|
|
|
@buttonClick="buttonClick" />
|
|
|
<uni-goods-nav v-if="form.status==0" :fill="true" :options="[]" :buttonGroup="buttonGroup2"
|
|
|
@@ -188,6 +188,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ keyboardShow: false,
|
|
|
buttonGroup: [{
|
|
|
text: '提交',
|
|
|
backgroundColor: '#03803B',
|
|
|
@@ -291,6 +292,18 @@
|
|
|
this.getDetail(this.form.id)
|
|
|
uni.removeStorageSync('isClainUpdate')
|
|
|
}
|
|
|
+ // 监听键盘高度变化
|
|
|
+ uni.onKeyboardHeightChange((res) => {
|
|
|
+ // 根据键盘高度调整布局
|
|
|
+ if (res.height > 0) {
|
|
|
+ this.keyboardShow = true
|
|
|
+ } else {
|
|
|
+ this.keyboardShow = false
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onUnload() {
|
|
|
+ uni.offKeyboardHeightChange();
|
|
|
},
|
|
|
watch: {
|
|
|
// 监听附件明细
|
|
|
@@ -313,17 +326,17 @@
|
|
|
methods: {
|
|
|
buttonClick(e) {
|
|
|
console.log(e)
|
|
|
- if(e.index==0){
|
|
|
+ if (e.index == 0) {
|
|
|
this.submit()
|
|
|
}
|
|
|
// this.options[2].info++
|
|
|
},
|
|
|
buttonClick2(e) {
|
|
|
console.log(e)
|
|
|
- if(e.index==0){
|
|
|
+ if (e.index == 0) {
|
|
|
this.submit()
|
|
|
}
|
|
|
- if(e.index==1){
|
|
|
+ if (e.index == 1) {
|
|
|
this.allClick('查看二维码')
|
|
|
}
|
|
|
// this.options[2].info++
|
|
|
@@ -783,33 +796,33 @@
|
|
|
if (!this.carNoVerify(this.form.vehicleNumber)) {
|
|
|
return
|
|
|
}
|
|
|
- let tyreNoList = []
|
|
|
- console.info(this.form.tireInsuranceFilesList)
|
|
|
+ let tyreNoList = []
|
|
|
+ console.info(this.form.tireInsuranceFilesList)
|
|
|
for (let item of this.form.tireInsuranceFilesList) {
|
|
|
- if (!item.tyreNo) {
|
|
|
- return uni.showToast({
|
|
|
- title: `请输入轮胎${item.affiliatedWithGroup }的胎号`,
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- }
|
|
|
- if (!item.tyreSpecs) {
|
|
|
- return uni.showToast({
|
|
|
- title: `轮胎${item.affiliatedWithGroup }的胎号没有规格信息,请检查胎号是否正确`,
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- }
|
|
|
- let existData = tyreNoList.find(i => i.tyreNo === item.tyreNo)
|
|
|
- if (existData && Number(existData.index) !== Number(item.affiliatedWithGroup)) {
|
|
|
- return uni.showToast({
|
|
|
- title: `轮胎${item.affiliatedWithGroup }的胎号重复,请检查轮胎${item.affiliatedWithGroup }的胎号是否正确`,
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- } else {
|
|
|
- tyreNoList.push({
|
|
|
- tyreNo: item.tyreNo,
|
|
|
- index: item.affiliatedWithGroup
|
|
|
- });
|
|
|
- }
|
|
|
+ if (!item.tyreNo) {
|
|
|
+ return uni.showToast({
|
|
|
+ title: `请输入轮胎${item.affiliatedWithGroup }的胎号`,
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (!item.tyreSpecs) {
|
|
|
+ return uni.showToast({
|
|
|
+ title: `轮胎${item.affiliatedWithGroup }的胎号没有规格信息,请检查胎号是否正确`,
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ let existData = tyreNoList.find(i => i.tyreNo === item.tyreNo)
|
|
|
+ if (existData && Number(existData.index) !== Number(item.affiliatedWithGroup)) {
|
|
|
+ return uni.showToast({
|
|
|
+ title: `轮胎${item.affiliatedWithGroup }的胎号重复,请检查轮胎${item.affiliatedWithGroup }的胎号是否正确`,
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ tyreNoList.push({
|
|
|
+ tyreNo: item.tyreNo,
|
|
|
+ index: item.affiliatedWithGroup
|
|
|
+ });
|
|
|
+ }
|
|
|
if (item.fileUrl == null) {
|
|
|
return uni.showToast({
|
|
|
title: `请上传轮胎${item.affiliatedWithGroup }的${+ item.fileProperties == 1 ?
|
|
|
@@ -834,7 +847,7 @@
|
|
|
});
|
|
|
}, 10);
|
|
|
uni.setStorageSync('isUpdate', true)
|
|
|
- this.getDetail(res.code === 601 ? this.form.id : res.data.id)
|
|
|
+ this.getDetail(res.code === 601 ? this.form.id : res.data.id)
|
|
|
})
|
|
|
.catch(() => {
|
|
|
uni.hideLoading()
|
|
|
@@ -1125,4 +1138,4 @@
|
|
|
pointer-events: none !important;
|
|
|
touch-action: none !important;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|