Commit 2ed215d1 authored by 何远江's avatar 何远江

bug修改

parent f3483343
......@@ -30,7 +30,7 @@
<relationships v-show="current === 0" :list="goodsList" @deleGonds="deleGonds" />
<metering v-show="current === 1" :form="form" />
<unpacking v-show="current === 2" />
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle" v-if="current === 0"></BottomBtn>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle" v-if="current !== 2"></BottomBtn>
</view>
</template>
......@@ -127,7 +127,7 @@
this.$u.toast('暂无提交数据');
return
}
if (!this.blNum) {
if (!this.blNum && this.form.ZZXFS === 'BL+PL') {
this.$u.toast('请扫描箱码');
return
}
......@@ -171,9 +171,7 @@
}
if (res.every((item) => item.TYPE === 'S')) {
this.$u.toast(res[0].MESSAGE);
setTimeout(() => {
this.goBack()
}, 1000)
this.resetData()
}
const foundObject = res.find(item => item.TYPE === 'E');
if (foundObject && foundObject.MESSAGE) {
......@@ -181,6 +179,11 @@
}
});
},
// 重置数据
resetData() {
this.goodsList = [];
this.form.brgew = ''
},
// 删除
deleGonds(idx) {
this.goodsList.splice(idx, 1);
......
......@@ -28,7 +28,9 @@
<script>
import BottomBtn from '@/components/BottomBtn/index.vue';
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import { parseTime} from "@/utils/ruoyi";
import {
parseTime
} from "@/utils/ruoyi";
export default {
components: {
......@@ -58,31 +60,31 @@
},
methods: {
handleInputPlnr(e) {
if (this.goodsList.some((item) => item.ZCODE === e || item.PLNR === e)) {
if (this.goodsList.some((item) => item.ZCODE === e || item.PLNR === e)) {
this.$u.toast('已经存在当前条码');
this.reset()
return
}
// bl 长度 15 pl 长度 80
const bl = e.length <= 15 && e.length >= 13;
const pl = e.length > 15
if (bl) {
this.isFocus = false;
this.isDisabled = true;
this.goodsList.push({
ZCODE: e,
PLNR: ''
})
this.reset()
} else if (pl) {
this.isFocus = false;
this.isDisabled = true;
this.goodsList.push({
PLNR: e,
ZCODE: ''
})
this.reset()
}
// bl 长度 15 pl 长度 80
const bl = e.length <= 15 && e.length >= 13;
const pl = e.length > 15
if (bl) {
this.isFocus = false;
this.isDisabled = true;
this.goodsList.push({
ZCODE: e,
PLNR: ''
})
this.reset()
} else if (pl) {
this.isFocus = false;
this.isDisabled = true;
this.goodsList.push({
PLNR: e,
ZCODE: ''
})
this.reset()
}
},
deleGonds(index) {
this.goodsList.splice(index, 1)
......@@ -94,18 +96,21 @@
this.wxparams = ''
}, 1000);
},
goBack() {
uni.navigateBack()
},
getBtnHandle(row) {
console.log('getBtnHandle', row);
this[row.way]();
},
// 提交
// 提交
goSubmit() {
if (!this.goodsList.length) {
return this.$u.toast('请扫描需要下架的箱条码/外箱码')
}
const DATUM = parseTime(new Date(),'{y}{m}{d}'),
const DATUM = parseTime(new Date(), '{y}{m}{d}'),
UNAME = this.vuex_user.nickName,
UZEIT = parseTime(new Date(),'{h}{i}{s}');
UZEIT = parseTime(new Date(), '{h}{i}{s}');
const arr = this.goodsList
this.$u.api.sapApi
.sapCasePlnr2(arr)
......@@ -132,11 +137,12 @@
flex: 1;
flex-direction: column;
}
page {
background: #f8f8f8;
}
/deep/ .u-sticky {
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
......@@ -144,11 +150,12 @@
.btn {
padding: 20rpx;
background: #fff;
.boxSelect {
margin-bottom: 20rpx;
}
}
.cardContent {
border-radius: 8px;
background: #fff;
......@@ -177,5 +184,4 @@
font-weight: 600;
}
}
</style>
</style>
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 to comment