cosmoim-852 fix 拣配多次点击提交按钮处理

master
guoshuang 3 years ago
parent c73ca99f86
commit ba805004a6

@ -173,7 +173,7 @@ export default class LoginPage extends BasePage {
//
this.Version = '1.1.10';
} else {
this.Version = '1.0.41';
this.Version = '1.0.43';
}
console.log('////', this.Version);
}

@ -286,10 +286,10 @@ export default class stoOutboundDom extends BasePage {
onOk() {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
this.customToast(this.$t('message.product_Tip6') as string);
return;
}
// if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
// this.customToast(this.$t('message.product_Tip6') as string);
// return;
// }
if (this.form.barCode == '') {
this.customToast(this.$t('message.barcode') as string);
return;

@ -75,7 +75,7 @@
<u-button type="primary" class="appoint" @click="bill">{{ $t('message.detailed') }}</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit">
<u-button type="success" :disabled="disableflg" @click="onSubmit">
{{ $t('message.po_Submit') }}
</u-button>
</u-col>
@ -117,6 +117,7 @@ export default class RawReceiptDetail extends BasePage {
* 页面Module
*/
model = model;
disableflg = false;
type = 'text';
wlCode: any = '';
LOCKProOrderResultListParams: any = '';
@ -386,6 +387,7 @@ export default class RawReceiptDetail extends BasePage {
* 提交
*/
async onSubmit() {
this.disableflg = true;
const dataList: any = [];
this.model.proOrderResultList.forEach((item: any) => {
if (item.checked == true) {
@ -394,26 +396,32 @@ export default class RawReceiptDetail extends BasePage {
});
if (dataList.length == 0) {
this.customToast(this.$t('message.Warehouse_Tip6') as any);
this.disableflg = false;
return;
}
await this.model.saveProOrderResultUploadRussia(dataList);
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.Warehouse_Tip9') as any,
duration: 2000,
image: '/static/icons/icon-51.png',
});
// this.GetLocation();
setTimeout(() => {
this.onAggregate();
}, 2000);
try {
await this.model.saveProOrderResultUploadRussia(dataList);
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.Warehouse_Tip9') as any,
duration: 2000,
image: '/static/icons/icon-51.png',
});
// this.GetLocation();
setTimeout(() => {
this.onAggregate();
}, 2000);
}
} catch (e) {
this.disableflg = false;
}
}
async onAggregate() {
await this.model.queryProOrder(this.model.formParams);
await this.model.queryProOrderResult(this.model.NEWparams);
if (this.model.proOrderResultList.length == 0) {
this.disableflg = false;
this.some = {};
this.LocationList = [];
this.wlCode = '';
@ -422,6 +430,7 @@ export default class RawReceiptDetail extends BasePage {
}
this.LOCKProOrderResultListParams = this.model.proOrderResultList;
await this.model.lockProOrderResult(this.model.proOrderResultList);
this.disableflg = false;
this.some = {};
this.LocationList = [];
this.wlCode = '';
@ -487,6 +496,7 @@ export default class RawReceiptDetail extends BasePage {
.right {
flex: 1;
}
.u-th {
flex: auto;
}
@ -576,6 +586,7 @@ export default class RawReceiptDetail extends BasePage {
// text-align: center;
// }
}
.single-left {
width: 100%;
height: 100rpx;
@ -588,6 +599,7 @@ export default class RawReceiptDetail extends BasePage {
line-height: 100rpx;
}
}
.library-right {
width: 100%;
height: 100rpx;

@ -74,7 +74,7 @@
<u-button type="primary" class="appoint" @click="bill">{{ $t('message.detailed') }}</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit">
<u-button type="success" :disabled="disableflg" @click="onSubmit">
{{ $t('message.po_Submit') }}
</u-button>
</u-col>
@ -109,6 +109,7 @@ export default class RawReceiptDetail extends BasePage {
receiverName: '',
password: '',
};
disableflg = false;
model = model;
type = 'text';
wlCode: any = '';
@ -366,6 +367,7 @@ export default class RawReceiptDetail extends BasePage {
}
//
async onSubmit() {
this.disableflg = true;
const includeOrderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
const dataList: any = [];
this.model.aggregateList.forEach((item: any) => {
@ -375,6 +377,7 @@ export default class RawReceiptDetail extends BasePage {
});
if (dataList.length == 0) {
this.customToast(this.$t('message.Warehouse_Tip6') as any);
this.disableflg = false;
return;
}
const params = {
@ -383,16 +386,21 @@ export default class RawReceiptDetail extends BasePage {
dataList,
includeOrderOutIdList,
};
await this.model.saveAggregateUploadRussia(params);
if (this.model.code == '1') {
uni.showToast({
duration: 2000,
title: this.$t('message.Warehouse_Tip9') as string,
image: '/static/icons/icon-51.png',
});
setTimeout(() => {
this.onAggregate();
}, 2000);
try {
await this.model.saveAggregateUploadRussia(params);
if (this.model.code == '1') {
//this.disableflg = false;
uni.showToast({
duration: 2000,
title: this.$t('message.Warehouse_Tip9') as string,
image: '/static/icons/icon-51.png',
});
setTimeout(() => {
this.onAggregate();
}, 2000);
}
} catch (e) {
this.disableflg = false;
}
}
async onAggregate() {
@ -406,6 +414,7 @@ export default class RawReceiptDetail extends BasePage {
};
this.unLockParams = params;
await this.model.queryAggregateList(params);
this.disableflg = false;
this.some = {};
this.LocationList = [];
this.wlCode = '';
@ -471,9 +480,11 @@ export default class RawReceiptDetail extends BasePage {
.right {
flex: 1;
}
.u-th {
flex: auto;
}
.icon {
display: flex;
justify-content: center;
@ -559,6 +570,7 @@ export default class RawReceiptDetail extends BasePage {
// text-align: center;
// }
}
.single-left {
width: 100%;
height: 100rpx;

@ -69,7 +69,7 @@
<u-button type="primary" class="appoint" @click="bill">{{ $t('message.detailed') }}</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit">
<u-button type="success" :disabled="disableflg" @click="onSubmit">
{{ $t('message.po_Submit') }}
</u-button>
</u-col>
@ -115,6 +115,7 @@ export default class RawReceiptDetail extends BasePage {
wlCode: any = '';
LOCKProOrderResultListParams: any = '';
border = true;
disableflg = false;
//
LocationList: any = [];
//
@ -292,6 +293,7 @@ export default class RawReceiptDetail extends BasePage {
* 提交
*/
async onSubmit() {
this.disableflg = true;
const dataList: any = [];
this.model.proOrderResultList.forEach((item: any) => {
if (item.checked == true) {
@ -300,26 +302,32 @@ export default class RawReceiptDetail extends BasePage {
});
if (dataList.length == 0) {
this.customToast(this.$t('message.Warehouse_Tip6') as any);
this.disableflg = false;
return;
}
await this.model.saveProOrderResultUpload(dataList);
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.Warehouse_Tip9') as any,
duration: 2000,
image: '/static/icons/icon-51.png',
});
// this.GetLocation();
setTimeout(() => {
this.onAggregate();
}, 2000);
try {
await this.model.saveProOrderResultUpload(dataList);
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.Warehouse_Tip9') as any,
duration: 2000,
image: '/static/icons/icon-51.png',
});
// this.GetLocation();
setTimeout(() => {
this.onAggregate();
}, 2000);
}
} catch (e) {
this.disableflg = false;
}
}
async onAggregate() {
await this.model.queryProOrder(this.model.formParams);
await this.model.queryProOrderResult(this.model.NEWparams);
if (this.model.proOrderResultList.length == 0) {
this.disableflg = false;
this.some = {};
this.LocationList = [];
this.wlCode = '';
@ -327,6 +335,7 @@ export default class RawReceiptDetail extends BasePage {
}
this.LOCKProOrderResultListParams = this.model.proOrderResultList;
await this.model.lockProOrderResult(this.model.proOrderResultList);
this.disableflg = false;
this.some = {};
this.LocationList = [];
this.wlCode = '';

@ -67,7 +67,7 @@
<u-button type="primary" class="appoint" @click="bill">{{ $t('message.detailed') }}</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit">
<u-button type="success" :disabled="disableflg" @click="onSubmit">
{{ $t('message.po_Submit') }}
</u-button>
</u-col>
@ -102,6 +102,7 @@ export default class RawReceiptDetail extends BasePage {
receiverName: '',
password: '',
};
disableflg = false;
model = model;
type = 'text';
wlCode: any = '';
@ -272,6 +273,7 @@ export default class RawReceiptDetail extends BasePage {
}
//
async onSubmit() {
this.disableflg = true;
const includeOrderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
const dataList: any = [];
this.model.aggregateList.forEach((item: any) => {
@ -281,6 +283,7 @@ export default class RawReceiptDetail extends BasePage {
});
if (dataList.length == 0) {
this.customToast(this.$t('message.Warehouse_Tip6') as any);
this.disableflg = false;
return;
}
const params = {
@ -289,16 +292,21 @@ export default class RawReceiptDetail extends BasePage {
dataList,
includeOrderOutIdList,
};
await this.model.saveAggregateUpload(params);
if (this.model.code == '1') {
uni.showToast({
duration: 2000,
title: this.$t('message.Warehouse_Tip9') as string,
image: '/static/icons/icon-51.png',
});
setTimeout(() => {
this.onAggregate();
}, 2000);
try {
await this.model.saveAggregateUpload(params);
if (this.model.code == '1') {
//this.disableflg = false;
uni.showToast({
duration: 2000,
title: this.$t('message.Warehouse_Tip9') as string,
image: '/static/icons/icon-51.png',
});
setTimeout(() => {
this.onAggregate();
}, 2000);
}
} catch (e) {
this.disableflg = false;
}
}
async onAggregate() {
@ -312,6 +320,7 @@ export default class RawReceiptDetail extends BasePage {
};
this.unLockParams = params;
await this.model.queryAggregateList(params);
this.disableflg = false;
this.some = {};
this.LocationList = [];
this.wlCode = '';

Loading…
Cancel
Save