cosmoim-852 fix 扫码添加后光标再次定位

master
guoshuang 3 years ago
parent 033d6c2ae4
commit 50821e65e8

@ -273,6 +273,10 @@ export default class dnReceiptDom extends BasePage {
this.barCode = '';
this.num = '';
this.locCode = '';
this.firstFocus = false;
this.$nextTick(() => {
this.firstFocus = true;
});
console.log('this.model.dnNoList', this.model.dnNoList);
}
deleteItem(e: any) {

@ -277,6 +277,10 @@ export default class dnReceiptDom extends BasePage {
this.SunmitList.push(obj);
this.num = '';
this.barCode = '';
this.firstFocus = false;
this.$nextTick(() => {
this.firstFocus = true;
});
//this.locCode = '';
console.log('this.model.dnNoList', this.model.dnNoList);
}

@ -103,7 +103,7 @@ export default class SemiFinishedSO extends BasePage {
model = model;
detailHeader = detailHeader;
disabled = false;
isfocus = true;
isfocus = false;
form: any = {
documentNo: '',
};
@ -221,10 +221,6 @@ export default class SemiFinishedSO extends BasePage {
}
//
Add() {
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
if (this.Container == '') {
this.customToast(this.$t('message.scanningContainer') as any);
return;
@ -290,6 +286,10 @@ export default class SemiFinishedSO extends BasePage {
this.nowAmount = '';
this.Barcode = '';
this.Container = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
//this.disabled = false;
}
}

@ -47,7 +47,7 @@
<view class="single">
<view class="single-left">
<view>{{ $t('message.Container') }}:</view>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" :focus="isfocus" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -122,6 +122,7 @@ export default class dnReceiptDom extends BasePage {
wlCode: any = '';
materialIndex: any = null;
Barcode: any = '';
isfocus = false;
Container: any = '';
async QueryLoc() {
await this.model.queryItemLoc({
@ -315,6 +316,10 @@ export default class dnReceiptDom extends BasePage {
this.Container = '';
this.Loc = [];
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
} else if (res.cancel) {
return;
}

@ -55,7 +55,7 @@
<view class="single">
<view class="single-left">
<view>{{ $t('message.Container') }}:</view>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" :focus="isfocus" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -143,6 +143,7 @@ export default class dnReceiptDom extends BasePage {
requestAmount: number = null;
//
Barcode: any = '';
isfocus = false;
Container: any = '';
//
async onShow() {
@ -389,6 +390,10 @@ export default class dnReceiptDom extends BasePage {
this.Barcode = '';
this.every = this.DNReceivingList[this.everyIndex];
this.disabled = false;
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
}
deleteItem(e: any) {

@ -25,7 +25,7 @@
<view class="library">
<view class="single-left">
<view>{{ $t('message.Container') }}</view>
<u-search :placeholder="$t('message.PleaseScan')" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" :focus="isfocus" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="library-left">
<view>{{ $t('message.CommissionedLocation') }}:</view>
@ -129,6 +129,7 @@ export default class RawReceiptDetail extends BasePage {
some: any = {};
Container: any = {};
Barcode: any = '';
isfocus = false;
qty: any = '';
/**
* 表单数据
@ -319,6 +320,11 @@ export default class RawReceiptDetail extends BasePage {
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
},
});
@ -339,6 +345,11 @@ export default class RawReceiptDetail extends BasePage {
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
}
}

@ -27,7 +27,7 @@
<!-- 容器编码 -->
<view class="single-left">
<view>{{ $t('message.Container') }}</view>
<u-search :placeholder="$t('message.PleaseScan')" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" :focus="isfocus" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="library-left">
<view>{{ $t('message.CommissionedLocation') }}:</view>
@ -122,6 +122,7 @@ export default class RawReceiptDetail extends BasePage {
some: any = {};
Container: any = {};
Barcode: any = '';
isfocus = false;
qty: any = '';
//
form: any = {
@ -309,6 +310,11 @@ export default class RawReceiptDetail extends BasePage {
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
},
});
@ -329,6 +335,11 @@ export default class RawReceiptDetail extends BasePage {
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
}
}

@ -36,7 +36,7 @@
<view class="single">
<view class="single-left">
<view>{{ $t('message.Container') }}:</view>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" :focus="isfocus" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -111,6 +111,7 @@ export default class returningDom extends BasePage {
operator: any = '';
form: any = {};
Barcode: any = '';
isfocus = false;
qty: any = '';
prdOrder: any = [];
wlCode: any = '';
@ -228,6 +229,10 @@ export default class returningDom extends BasePage {
this.Container = '';
this.Barcode = '';
this.qty = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
deleteItem(e: any) {
uni.showModal({

@ -59,7 +59,7 @@
<view class="single">
<view class="single-left">
<view>{{ $t('message.Container') }}:</view>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" :focus="isfocus" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -164,6 +164,7 @@ export default class RawReceiptDetail extends BasePage {
some: any = {};
Container: any = {};
qty: any = '';
isfocus = false;
form: any = {
documentNo: '',
amount: null,
@ -405,6 +406,11 @@ export default class RawReceiptDetail extends BasePage {
this.business();
this.qty = '';
this.Container = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
}
deleteItem(e: any): void {

@ -70,7 +70,7 @@
<view class="single">
<view class="single-left">
<view>{{ $t('message.Container') }}:</view>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" :focus="isfocus" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -150,6 +150,7 @@ export default class RawReceiptDetail extends BasePage {
password: '',
};
Barcode: any = '';
isfocus = false;
model = model;
materialList: any = [];
type = 'text';
@ -310,6 +311,10 @@ export default class RawReceiptDetail extends BasePage {
this.qty = '';
this.Container = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
//
deleteItem(e: any) {

@ -35,7 +35,7 @@
<view class="single">
<view class="single-left">
<view>{{ $t('message.source') }}:</view>
<u-search :placeholder="$t('message.barcodeSource')" style="z-index: 10000" v-model="NextCode" @search="searchSource" :show-action="false"></u-search>
<u-search :placeholder="$t('message.barcodeSource')" :focus="isfocus" style="z-index: 10000" v-model="NextCode" @search="searchSource" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="searchSource">{{ $t('message.Query') }}</u-button>
@ -67,7 +67,7 @@
</u-col>
<!-- 返回 -->
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
</u-col>
</u-row>
</view>
@ -90,6 +90,7 @@ export default class KanDanHandOver extends BasePage {
model = model;
barcode = '';
every: any = {};
isfocus = false;
async query() {
if (this.barcode == '' || this.barcode.length == 0) {
this.customToast(this.$t('message.Commission_tips1') as string);
@ -131,6 +132,12 @@ export default class KanDanHandOver extends BasePage {
NewQty: any = '';
Submitlist: any = [];
Add() {
let sum = 0;
this.Submitlist.forEach((item) => {
sum += parseFloat(item.qty);
});
// this.allnumber = sum;
console.log('/////////', this.model.SourceDetail.qty);
if (this.NewQty == '') {
this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
return;
@ -139,11 +146,11 @@ export default class KanDanHandOver extends BasePage {
this.customToast(this.$t('message.Commission_tips3') as string);
return;
}
if (parseFloat(this.NewQty) > parseFloat(this.every.qty)) {
this.customToast(this.$t('message.Commission_tips4') as string);
return;
}
if (parseFloat(this.NewQty) > parseFloat(this.model.SourceDetail.qty)) {
// if (parseFloat(this.NewQty) > parseFloat(this.every.qty)) {
// this.customToast(this.$t('message.Commission_tips4') as string);
// return;
// }
if (parseFloat(this.NewQty) + sum > parseFloat(this.model.SourceDetail.qty)) {
this.customToast(this.$t('message.Commission_tips4') as string);
return;
}
@ -156,7 +163,13 @@ export default class KanDanHandOver extends BasePage {
};
this.Submitlist.push(arr);
this.every.qty += parseFloat(this.NewQty);
this.model.SourceDetail.qty -= parseFloat(this.NewQty);
// this.model.SourceDetail.qty -= parseFloat(this.NewQty);
this.NextCode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
deleteItem(e: any) {
uni.showModal({
@ -167,7 +180,7 @@ export default class KanDanHandOver extends BasePage {
if (res.confirm) {
this.Submitlist.splice(e.contentIndex, 1);
this.every.qty -= parseFloat(e.lineData.qty);
this.model.SourceDetail.qty += parseFloat(e.lineData.qty);
//this.model.SourceDetail.qty += parseFloat(e.lineData.qty);
} else if (res.cancel) {
return;
}

@ -50,7 +50,7 @@
<view class="single">
<view class="single-left">
<view>{{ $t('message.Container') }}:</view>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" :focus="isfocus" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -97,6 +97,7 @@ export default class KanDanHandOver extends BasePage {
Some: any = {};
MaterialList: any = [];
Barcode: any = '';
isfocus = false;
qty: any = 0;
SubmitOrderlist: any = [];
Container: any = '';
@ -218,6 +219,10 @@ export default class KanDanHandOver extends BasePage {
this.qty = 0;
this.Container = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
deleteItem(e: any) {
uni.showModal({

@ -58,7 +58,7 @@
<view class="single">
<view class="single-left">
<view>{{ $t('message.Container') }}:</view>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" :focus="isfocus" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -118,6 +118,7 @@ export default class KanDanHandOver extends BasePage {
Container: any = '';
qty: any = 0;
Barcode: any = '';
isfocus = false;
SomeIndex = 0;
async query() {
if (this.order3 === '') {
@ -259,6 +260,10 @@ export default class KanDanHandOver extends BasePage {
this.Container = '';
this.qty = 0;
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
//this.dockCode = '';
//this.dockName = '';
}

@ -47,7 +47,7 @@
<view class="single">
<view class="single-left">
<view>{{ $t('message.Container') }}:</view>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" :focus="isfocus" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -97,6 +97,7 @@ export default class KanDanHandOver extends BasePage {
orderlist: any = [];
orderlistIndex = 0;
Barcode: any = '';
isfocus = false;
SubmitOrderlist: any = [];
Container: any = '';
async query() {
@ -175,6 +176,10 @@ export default class KanDanHandOver extends BasePage {
this.Barcode = '';
this.Container = '';
this.total = 0;
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
}
deleteItem(e: any) {
uni.showModal({

Loading…
Cancel
Save