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'; this.Version = '1.1.10';
} else { } else {
this.Version = '1.0.41'; this.Version = '1.0.43';
} }
console.log('////', this.Version); console.log('////', this.Version);
} }

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

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

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

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

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

Loading…
Cancel
Save