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.barCode = '';
this.num = ''; this.num = '';
this.locCode = ''; this.locCode = '';
this.firstFocus = false;
this.$nextTick(() => {
this.firstFocus = true;
});
console.log('this.model.dnNoList', this.model.dnNoList); console.log('this.model.dnNoList', this.model.dnNoList);
} }
deleteItem(e: any) { deleteItem(e: any) {

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

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

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

@ -55,7 +55,7 @@
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}:</view> <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>
<view class="single-right"> <view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button> <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; requestAmount: number = null;
// //
Barcode: any = ''; Barcode: any = '';
isfocus = false;
Container: any = ''; Container: any = '';
// //
async onShow() { async onShow() {
@ -389,6 +390,10 @@ export default class dnReceiptDom extends BasePage {
this.Barcode = ''; this.Barcode = '';
this.every = this.DNReceivingList[this.everyIndex]; this.every = this.DNReceivingList[this.everyIndex];
this.disabled = false; this.disabled = false;
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
} }
} }
deleteItem(e: any) { deleteItem(e: any) {

@ -25,7 +25,7 @@
<view class="library"> <view class="library">
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}</view> <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>
<view class="library-left"> <view class="library-left">
<view>{{ $t('message.CommissionedLocation') }}:</view> <view>{{ $t('message.CommissionedLocation') }}:</view>
@ -129,6 +129,7 @@ export default class RawReceiptDetail extends BasePage {
some: any = {}; some: any = {};
Container: any = {}; Container: any = {};
Barcode: any = ''; Barcode: any = '';
isfocus = false;
qty: any = ''; 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].wlList.push(TEM);
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty); this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
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].wlList.push(TEM);
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty); this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = ''; this.qty = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
} }
} }
} }

@ -27,7 +27,7 @@
<!-- 容器编码 --> <!-- 容器编码 -->
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}</view> <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>
<view class="library-left"> <view class="library-left">
<view>{{ $t('message.CommissionedLocation') }}:</view> <view>{{ $t('message.CommissionedLocation') }}:</view>
@ -122,6 +122,7 @@ export default class RawReceiptDetail extends BasePage {
some: any = {}; some: any = {};
Container: any = {}; Container: any = {};
Barcode: any = ''; Barcode: any = '';
isfocus = false;
qty: any = ''; qty: any = '';
// //
form: 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].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty); this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
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].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty); this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = ''; this.qty = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
} }
} }
} }

@ -36,7 +36,7 @@
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}:</view> <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>
<view class="single-right"> <view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button> <u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -111,6 +111,7 @@ export default class returningDom extends BasePage {
operator: any = ''; operator: any = '';
form: any = {}; form: any = {};
Barcode: any = ''; Barcode: any = '';
isfocus = false;
qty: any = ''; qty: any = '';
prdOrder: any = []; prdOrder: any = [];
wlCode: any = ''; wlCode: any = '';
@ -228,6 +229,10 @@ export default class returningDom extends BasePage {
this.Container = ''; this.Container = '';
this.Barcode = ''; this.Barcode = '';
this.qty = ''; this.qty = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
} }
deleteItem(e: any) { deleteItem(e: any) {
uni.showModal({ uni.showModal({

@ -59,7 +59,7 @@
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}:</view> <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>
<view class="single-right"> <view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button> <u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -164,6 +164,7 @@ export default class RawReceiptDetail extends BasePage {
some: any = {}; some: any = {};
Container: any = {}; Container: any = {};
qty: any = ''; qty: any = '';
isfocus = false;
form: any = { form: any = {
documentNo: '', documentNo: '',
amount: null, amount: null,
@ -405,6 +406,11 @@ export default class RawReceiptDetail extends BasePage {
this.business(); this.business();
this.qty = ''; this.qty = '';
this.Container = ''; this.Container = '';
this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
} }
} }
deleteItem(e: any): void { deleteItem(e: any): void {

@ -70,7 +70,7 @@
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}:</view> <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>
<view class="single-right"> <view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button> <u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -150,6 +150,7 @@ export default class RawReceiptDetail extends BasePage {
password: '', password: '',
}; };
Barcode: any = ''; Barcode: any = '';
isfocus = false;
model = model; model = model;
materialList: any = []; materialList: any = [];
type = 'text'; type = 'text';
@ -310,6 +311,10 @@ export default class RawReceiptDetail extends BasePage {
this.qty = ''; this.qty = '';
this.Container = ''; this.Container = '';
this.Barcode = ''; this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
} }
// //
deleteItem(e: any) { deleteItem(e: any) {

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

@ -50,7 +50,7 @@
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}:</view> <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>
<view class="single-right"> <view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button> <u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -97,6 +97,7 @@ export default class KanDanHandOver extends BasePage {
Some: any = {}; Some: any = {};
MaterialList: any = []; MaterialList: any = [];
Barcode: any = ''; Barcode: any = '';
isfocus = false;
qty: any = 0; qty: any = 0;
SubmitOrderlist: any = []; SubmitOrderlist: any = [];
Container: any = ''; Container: any = '';
@ -218,6 +219,10 @@ export default class KanDanHandOver extends BasePage {
this.qty = 0; this.qty = 0;
this.Container = ''; this.Container = '';
this.Barcode = ''; this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
} }
deleteItem(e: any) { deleteItem(e: any) {
uni.showModal({ uni.showModal({

@ -58,7 +58,7 @@
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}:</view> <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>
<view class="single-right"> <view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button> <u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -118,6 +118,7 @@ export default class KanDanHandOver extends BasePage {
Container: any = ''; Container: any = '';
qty: any = 0; qty: any = 0;
Barcode: any = ''; Barcode: any = '';
isfocus = false;
SomeIndex = 0; SomeIndex = 0;
async query() { async query() {
if (this.order3 === '') { if (this.order3 === '') {
@ -259,6 +260,10 @@ export default class KanDanHandOver extends BasePage {
this.Container = ''; this.Container = '';
this.qty = 0; this.qty = 0;
this.Barcode = ''; this.Barcode = '';
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
//this.dockCode = ''; //this.dockCode = '';
//this.dockName = ''; //this.dockName = '';
} }

@ -47,7 +47,7 @@
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}:</view> <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>
<view class="single-right"> <view class="single-right">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button> <u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
@ -97,6 +97,7 @@ export default class KanDanHandOver extends BasePage {
orderlist: any = []; orderlist: any = [];
orderlistIndex = 0; orderlistIndex = 0;
Barcode: any = ''; Barcode: any = '';
isfocus = false;
SubmitOrderlist: any = []; SubmitOrderlist: any = [];
Container: any = ''; Container: any = '';
async query() { async query() {
@ -175,6 +176,10 @@ export default class KanDanHandOver extends BasePage {
this.Barcode = ''; this.Barcode = '';
this.Container = ''; this.Container = '';
this.total = 0; this.total = 0;
this.isfocus = false;
this.$nextTick(() => {
this.isfocus = true;
});
} }
deleteItem(e: any) { deleteItem(e: any) {
uni.showModal({ uni.showModal({

Loading…
Cancel
Save