原材料提示长存提示框

master
guoshuang 3 years ago
parent 81e668033f
commit 770eb0a85a

@ -170,6 +170,8 @@ export default {
ModelCode: '型号编码', ModelCode: '型号编码',
ModelName: '型号名称', ModelName: '型号名称',
ModelScanned: '型号已扫', ModelScanned: '型号已扫',
Pi_tip13: '请选择要提交的物料',
Pi_tip15: '请确保交接数量等于需求数量',
//汇总交接 //汇总交接
Summary_Query: '汇总查询', Summary_Query: '汇总查询',

@ -27,6 +27,8 @@ export default {
error: 'Error', error: 'Error',
successful: 'Query was successful', successful: 'Query was successful',
operation: 'Operation', operation: 'Operation',
Pi_tip13: 'Please select the material to submit',
Pi_tip15: 'Please ensure that the handover quantity is equal to the demand quantity',
//版本更新 //版本更新
updatePrompt: 'Update tips', updatePrompt: 'Update tips',
Tip1: 'New version detected, update?', Tip1: 'New version detected, update?',

@ -146,10 +146,7 @@ export default class dnReceiptDom extends BasePage {
// //
async query() { async query() {
if (this.form.documentNo == '') { if (this.form.documentNo == '') {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as any);
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return; return;
} }
this.materialList = []; this.materialList = [];
@ -179,24 +176,15 @@ export default class dnReceiptDom extends BasePage {
// //
Add() { Add() {
if (this.nowAmount == '' || this.wlCode == '') { if (this.nowAmount == '' || this.wlCode == '') {
uni.showToast({ this.customToast(this.$t('message.Commission_tips2') as any);
icon: 'none',
title: this.$t('message.Commission_tips2') as any,
});
return; return;
} }
if (parseFloat(this.nowAmount) <= 0) { if (parseFloat(this.nowAmount) <= 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips3') as any);
icon: 'none',
title: this.$t('message.Commission_tips3') as any,
});
return; return;
} }
if (parseFloat(this.nowAmount) > this.every.poAmount) { if (parseFloat(this.nowAmount) > this.every.poAmount) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips4') as any);
icon: 'none',
title: this.$t('message.Commission_tips4') as any,
});
return; return;
} }
let arr = { let arr = {
@ -212,10 +200,7 @@ export default class dnReceiptDom extends BasePage {
} }
async onSubmit() { async onSubmit() {
if (this.list == null || this.list.length == 0) { if (this.list == null || this.list.length == 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips5') as any);
icon: 'none',
title: this.$t('message.Commission_tips5') as any,
});
} }
let upload = { let upload = {
poNo: this.form.documentNo, poNo: this.form.documentNo,
@ -233,10 +218,7 @@ export default class dnReceiptDom extends BasePage {
} }
async bill() { async bill() {
if (this.form.documentNo == '') { if (this.form.documentNo == '') {
uni.showToast({ this.customToast(this.$t('message._tips6') as any)
icon: 'none',
title: this.$t('message._tips6') as any,
});
return; return;
} }
let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
@ -249,7 +231,7 @@ export default class dnReceiptDom extends BasePage {
} }
// //
business() { business() {
let num: number = 0; let num = 0;
this.list.forEach((item: any) => { this.list.forEach((item: any) => {
num += parseFloat(item.nowAmount); num += parseFloat(item.nowAmount);
}); });

@ -158,10 +158,7 @@ export default class dnReceiptDom extends BasePage {
this.every = ''; this.every = '';
this.materialList = []; this.materialList = [];
if (this.form.documentNo == '') { if (this.form.documentNo == '') {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as any);
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return; return;
} }
this.materialList = []; this.materialList = [];
@ -192,24 +189,15 @@ export default class dnReceiptDom extends BasePage {
// //
Add() { Add() {
if (!this.every) { if (!this.every) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips6') as any);
icon: 'none',
title: this.$t('message.Commission_tips6') as any,
});
return; return;
} }
if (this.nowAmount == '' || this.wlCode == '') { if (this.nowAmount == '' || this.wlCode == '') {
uni.showToast({ this.customToast(this.$t('message.Commission_tips2') as any);
icon: 'none',
title: this.$t('message.Commission_tips2') as any,
});
return; return;
} }
if (parseFloat(this.nowAmount) <= 0) { if (parseFloat(this.nowAmount) <= 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips3') as any);
icon: 'none',
title: this.$t('message.Commission_tips3') as any,
});
return; return;
} }
let num: number = parseFloat(this.nowAmount); let num: number = parseFloat(this.nowAmount);
@ -261,10 +249,7 @@ export default class dnReceiptDom extends BasePage {
} }
async onSubmit() { async onSubmit() {
if (this.list == null || this.list.length == 0) { if (this.list == null || this.list.length == 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips5') as any);
icon: 'none',
title: this.$t('message.Commission_tips5') as any,
});
} }
// let upload = { // let upload = {
// poNo: this.form.documentNo, // poNo: this.form.documentNo,
@ -278,10 +263,7 @@ export default class dnReceiptDom extends BasePage {
} }
async bill() { async bill() {
if (this.form.documentNo == '') { if (this.form.documentNo == '') {
uni.showToast({ this.customToast(this.$t('message._tips6') as any);
icon: 'none',
title: this.$t('message._tips6') as any,
});
return; return;
} }
let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
@ -295,7 +277,7 @@ export default class dnReceiptDom extends BasePage {
} }
// //
business() { business() {
let num: number = 0; let num = 0;
this.list.forEach((item: any) => { this.list.forEach((item: any) => {
num += parseFloat(item.nowAmount); num += parseFloat(item.nowAmount);
}); });

@ -256,10 +256,10 @@ export default class Aggregating extends BasePage {
materialList = this.model.checkedProOrderList.map((_: any) => _.materialCode); materialList = this.model.checkedProOrderList.map((_: any) => _.materialCode);
} }
if (orderNoList.length === 0 && this.model.proOrderList.length > 0) { if (orderNoList.length === 0 && this.model.proOrderList.length > 0) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_OrderNoNotSelected') as string }); this.customToast(this.$t('message.Pi_OrderNoNotSelected') as string);
return; return;
} else if (orderNoList.length === 0) { } else if (orderNoList.length === 0) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_NoDataFound') as string }); this.customToast(this.$t('message.Pi_NoDataFound') as string);
return; return;
} }
const params = { const params = {

@ -177,10 +177,7 @@ export default class AggregatingOrder extends BasePage {
if (!valid) return; if (!valid) return;
const firstSelection = this.model.orderList.find((_) => _.checked); const firstSelection = this.model.orderList.find((_) => _.checked);
if (firstSelection === undefined) { if (firstSelection === undefined) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip7') as string);
icon: 'none',
title: this.$t('message.Pi_tip7') as string,
});
} else { } else {
// //
const currentPickNum = parseFloat(this.amountForm.amount); const currentPickNum = parseFloat(this.amountForm.amount);
@ -189,10 +186,7 @@ export default class AggregatingOrder extends BasePage {
// //
const totalMoAmount = parseFloat(firstSelection.totalMoAmount); const totalMoAmount = parseFloat(firstSelection.totalMoAmount);
if (currentPickNum != totalMoAmount) { if (currentPickNum != totalMoAmount) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip12') as string);
icon: 'none',
title: this.$t('message.Pi_tip12') as string,
});
return; return;
} }
model.setOrderListItemHvAmount({ model.setOrderListItemHvAmount({
@ -206,10 +200,7 @@ export default class AggregatingOrder extends BasePage {
this.$submitForm.validate(async (valid) => { this.$submitForm.validate(async (valid) => {
if (valid) { if (valid) {
if (model.orderList.length === 0) { if (model.orderList.length === 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip4') as string);
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
});
} else { } else {
await auth.checkPassword({ await auth.checkPassword({
rfPwd: this.submitForm.password, rfPwd: this.submitForm.password,
@ -230,17 +221,11 @@ export default class AggregatingOrder extends BasePage {
} }
}); });
if (selectsta) { if (selectsta) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip4') as string);
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
});
return; return;
} }
if (submit) { if (submit) {
uni.showToast({ this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
icon: 'none',
title: this.$t('message.Summary_PleaseInputNumber') as string,
});
return; return;
} }
let List: any = []; let List: any = [];
@ -251,10 +236,7 @@ export default class AggregatingOrder extends BasePage {
} }
}); });
if (List.length == 0) { if (List.length == 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip13') as string);
icon: 'none',
title: '请先选择要提交的物料' as string,
});
return; return;
} }
List.forEach((item: any) => { List.forEach((item: any) => {
@ -264,10 +246,7 @@ export default class AggregatingOrder extends BasePage {
} }
}); });
if (isTrue != true) { if (isTrue != true) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip15') as string);
icon: 'none',
title: '请确保交接数量等于需求数量' as string,
});
return; return;
} }
await model.uploadOrderList({ await model.uploadOrderList({
@ -323,10 +302,11 @@ export default class AggregatingOrder extends BasePage {
orderOutIdList, orderOutIdList,
}); });
} catch (e) { } catch (e) {
uni.showToast({ this.customToast((this.$t('message.Summary_Tip') as string) + e.message);
icon: 'none', // uni.showToast({
title: (this.$t('message.Summary_Tip') as string) + e.message, // icon: 'none',
}); // title: (this.$t('message.Summary_Tip') as string) + e.message,
// });
} }
} }
} }

@ -176,10 +176,7 @@ export default class AggregatingSummary extends BasePage {
if (!valid) return; if (!valid) return;
const firstSelection = this.model.aggregateList.find((_) => _.checked); const firstSelection = this.model.aggregateList.find((_) => _.checked);
if (firstSelection === undefined) { if (firstSelection === undefined) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip7') as string);
icon: 'none',
title: this.$t('message.Pi_tip7') as string,
});
} else { } else {
// //
const currentPickNum = parseFloat(this.amountForm.amount); const currentPickNum = parseFloat(this.amountForm.amount);
@ -188,10 +185,7 @@ export default class AggregatingSummary extends BasePage {
// //
const totalMoAmount = parseFloat(firstSelection.totalMoAmount); const totalMoAmount = parseFloat(firstSelection.totalMoAmount);
if (currentPickNum != totalMoAmount) { if (currentPickNum != totalMoAmount) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip12') as string);
icon: 'none',
title: this.$t('message.Pi_tip12') as string,
});
return; return;
} }
model.setAggregateListItemHvAmount({ model.setAggregateListItemHvAmount({
@ -209,10 +203,7 @@ export default class AggregatingSummary extends BasePage {
this.$submitForm.validate(async (valid) => { this.$submitForm.validate(async (valid) => {
if (valid) { if (valid) {
if (model.aggregateList.length === 0) { if (model.aggregateList.length === 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip4') as string);
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
});
} else { } else {
await auth.checkPassword({ await auth.checkPassword({
rfPwd: this.submitForm.password, rfPwd: this.submitForm.password,
@ -232,17 +223,11 @@ export default class AggregatingSummary extends BasePage {
} }
}); });
if (selectsta) { if (selectsta) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip4') as string);
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
});
return; return;
} }
if (submit) { if (submit) {
uni.showToast({ this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
icon: 'none',
title: this.$t('message.Summary_PleaseInputNumber') as string,
});
return; return;
} }
let List: any = []; let List: any = [];
@ -253,10 +238,7 @@ export default class AggregatingSummary extends BasePage {
} }
}); });
if (List.length == 0) { if (List.length == 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip13') as string);
icon: 'none',
title: '请先选择要提交的物料' as string,
});
return; return;
} }
List.forEach((item: any) => { List.forEach((item: any) => {
@ -266,10 +248,7 @@ export default class AggregatingSummary extends BasePage {
} }
}); });
if (isTrue != true) { if (isTrue != true) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip15') as string);
icon: 'none',
title: '请确保交接数量等于需求数量' as string,
});
return; return;
} }
await model.uploadAggregateList({ await model.uploadAggregateList({
@ -328,10 +307,7 @@ export default class AggregatingSummary extends BasePage {
orderOutIdList, orderOutIdList,
}); });
} catch (e) { } catch (e) {
uni.showToast({ this.customToast((this.$t('message.Summary_Tip') as string) + e.message);
icon: 'none',
title: (this.$t('message.Summary_Tip') as string) + e.message,
});
} }
} }
} }

@ -173,34 +173,22 @@ export default class RawReceiptDetail extends BasePage {
} }
Add() { Add() {
if (this.qty == '' || this.wlCode == '') { if (this.qty == '' || this.wlCode == '') {
uni.showToast({ this.customToast(this.$t('message.Commission_tips2') as any);
icon: 'none',
title: this.$t('message.Commission_tips2') as any,
});
return; return;
} }
if (parseFloat(this.qty) <= 0) { if (parseFloat(this.qty) <= 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips3') as any);
icon: 'none',
title: this.$t('message.Commission_tips3') as any,
});
return; return;
} }
if (JSON.stringify(this.some) == '{}') { if (JSON.stringify(this.some) == '{}') {
uni.showToast({ this.customToast(this.$t('message.Commission_tips6') as any);
icon: 'none',
title: this.$t('message.Commission_tips6') as any,
});
return; return;
} }
let isTrue: boolean = true; let isTrue = true;
if (this.LocationList.length != 0) { if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => { this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code || this.wlCode.label === item.wlCode) { if (this.wlCode.sendSpot != item.Code || this.wlCode.label === item.wlCode) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips7') as any);
icon: 'none',
title: this.$t('message.Commission_tips7') as any,
});
return (isTrue = false); return (isTrue = false);
} }
}); });
@ -268,10 +256,7 @@ export default class RawReceiptDetail extends BasePage {
} }
async bill() { async bill() {
if (this.some == {} || this.some.prdOrder == null) { if (this.some == {} || this.some.prdOrder == null) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips6') as any);
icon: 'none',
title: this.$t('message.Commission_tips6') as any,
});
return; return;
} }
let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
@ -293,16 +278,13 @@ export default class RawReceiptDetail extends BasePage {
} }
}); });
if (dataList.length == 0) { if (dataList.length == 0) {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip6') as any);
icon: 'none',
title: this.$t('message.Warehouse_Tip6') as any,
});
return; return;
} }
await this.model.saveProOrderResultUpload(dataList); await this.model.saveProOrderResultUpload(dataList);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.Warehouse_Tip9') as any, title: this.$t('message.Warehouse_Tip9') as any,
}); });
this.GetLocation(); this.GetLocation();

@ -143,6 +143,8 @@ export default class RawReceiptDetail extends BasePage {
if (!this.model.aggregateList[data[0].index].sendSpot) { if (!this.model.aggregateList[data[0].index].sendSpot) {
uni.showModal({ uni.showModal({
content: this.$t('message.SAPLocation') as any, content: this.$t('message.SAPLocation') as any,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
this.model.aggregateList[data[0].index].checked = false; this.model.aggregateList[data[0].index].checked = false;
@ -161,35 +163,23 @@ export default class RawReceiptDetail extends BasePage {
// //
Add() { Add() {
if (this.qty == '' || this.wlCode == '') { if (this.qty == '' || this.wlCode == '') {
uni.showToast({ this.customToast(this.$t('message.Commission_tips2') as any);
icon: 'none',
title: this.$t('message.Commission_tips2') as any,
});
return; return;
} }
if (parseFloat(this.qty) <= 0) { if (parseFloat(this.qty) <= 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips3') as any);
icon: 'none',
title: this.$t('message.Commission_tips3') as any,
});
return; return;
} }
//guoshuang //guoshuang
if (JSON.stringify(this.some) == '{}') { if (JSON.stringify(this.some) == '{}') {
uni.showToast({ this.customToast(this.$t('message.Commission_tips6') as any);
icon: 'none',
title: this.$t('message.Commission_tips6') as any,
});
return; return;
} }
let isTrue: boolean = true; let isTrue = true;
if (this.LocationList.length != 0) { if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => { this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code) { if (this.wlCode.sendSpot != item.Code) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips7') as any);
icon: 'none',
title: this.$t('message.Commission_tips7') as any,
});
return (isTrue = false); return (isTrue = false);
} }
}); });
@ -270,10 +260,7 @@ export default class RawReceiptDetail extends BasePage {
} }
}); });
if (dataList.length == 0) { if (dataList.length == 0) {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip6') as any);
icon: 'none',
title: this.$t('message.Warehouse_Tip6') as any,
});
return; return;
} }
const params = { const params = {
@ -284,10 +271,7 @@ export default class RawReceiptDetail extends BasePage {
}; };
await this.model.saveAggregateUpload(params); await this.model.saveAggregateUpload(params);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip9') as any);
icon: 'none',
title: this.$t('message.Warehouse_Tip9') as any,
});
this.GetLocation(); this.GetLocation();
setTimeout(() => { setTimeout(() => {
this.onAggregate(); this.onAggregate();

@ -35,10 +35,7 @@ export default class RawReceiptDetail extends BasePage {
} }
async generate() { async generate() {
if (this.prdOrder == '') { if (this.prdOrder == '') {
uni.showToast({ this.customToast(this.$t('message._tips6') as any);
icon: 'none',
title: this.$t('message._tips6') as any,
});
return; return;
} }
let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);

@ -173,16 +173,10 @@ export default class pickingDom extends BasePage {
orderOutIdList = this.model.checkedProOrderList.map((_: any) => _.orderOutId); orderOutIdList = this.model.checkedProOrderList.map((_: any) => _.orderOutId);
} }
if (orderOutIdList.length === 0 && this.model.proOrderList.length > 0) { if (orderOutIdList.length === 0 && this.model.proOrderList.length > 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_OrderNoNotSelected') as string);
icon: 'none',
title: this.$t('message.Pi_OrderNoNotSelected') as string,
});
return; return;
} else if (orderOutIdList.length === 0) { } else if (orderOutIdList.length === 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_NoDataFound') as string);
icon: 'none',
title: this.$t('message.Pi_NoDataFound') as string,
});
return; return;
} }
const params = { const params = {

@ -116,10 +116,7 @@ export default class returningDom extends BasePage {
} }
async onSubmit() { async onSubmit() {
if (this.startMobile == '' || this.endMobile == '') { if (this.startMobile == '' || this.endMobile == '') {
uni.showToast({ this.customToast(this.$t('message.time') as string);
icon: 'none',
title: this.$t('message.time') as string,
});
return; return;
} }
let time = { let time = {

@ -218,18 +218,12 @@ export default class returningDom extends BasePage {
*/ */
onSubmit() { onSubmit() {
if (this.form.amount > this.model.orderInInfo.amount) { if (this.form.amount > this.model.orderInInfo.amount) {
uni.showToast({ this.customToast(this.$t('message.return_Tip4') as string);
icon: 'none',
title: this.$t('message.return_Tip4') as string,
});
} else { } else {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
if (!this.model.orderInInfo.sapFactoryCode) { if (!this.model.orderInInfo.sapFactoryCode) {
uni.showToast({ this.customToast(this.$t('message.return_Tip2') as string);
icon: 'none',
title: this.$t('message.return_Tip2') as string,
});
} }
// (this.form.sendSpot as any) = this.model.orderInInfo.sendSpot; // (this.form.sendSpot as any) = this.model.orderInInfo.sendSpot;
(this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode; (this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode;

@ -286,10 +286,10 @@ export default class Virtual extends BasePage {
orderNoList = this.model.checkedProOrderList.map((_: any) => _.prdOrder); orderNoList = this.model.checkedProOrderList.map((_: any) => _.prdOrder);
} }
if (orderNoList.length === 0 && this.model.proOrderList.length > 0) { if (orderNoList.length === 0 && this.model.proOrderList.length > 0) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_OrderNoNotSelected') as string }); this.customToast(this.$t('message.Pi_OrderNoNotSelected') as string);
return; return;
} else if (orderNoList.length === 0) { } else if (orderNoList.length === 0) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_NoDataFound') as string }); this.customToast(this.$t('message.Pi_NoDataFound') as string);
return; return;
} }
const params = { const params = {

@ -119,7 +119,7 @@ export class VirtualModule extends VuexModule {
if (!proOrderList.length) { if (!proOrderList.length) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '未查询到数据', title: 'No data found',
}); });
} }
return { proOrderList }; return { proOrderList };

@ -176,10 +176,7 @@ export default class VirtualSummary extends BasePage {
// //
const firstRecord = model.summaryList[0]; const firstRecord = model.summaryList[0];
if (firstRecord === undefined) { if (firstRecord === undefined) {
uni.showToast({ this.customToast(this.$t('message.LBWK') as string);
icon: 'none',
title: this.$t('message.LBWK') as string,
});
return; return;
} }
console.log('firstRecord', firstRecord); console.log('firstRecord', firstRecord);
@ -196,10 +193,7 @@ export default class VirtualSummary extends BasePage {
// //
const firstSelection = this.model.summaryList.find((_: any) => _.checked); const firstSelection = this.model.summaryList.find((_: any) => _.checked);
if (firstSelection === undefined) { if (firstSelection === undefined) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip7') as string);
icon: 'none',
title: this.$t('message.Pi_tip7') as string,
});
} else { } else {
const inputAmount = parseFloat(this.amountForm.amount); // const inputAmount = parseFloat(this.amountForm.amount); //
const totalHvAmount = firstSelection.totalHvAmount; const totalHvAmount = firstSelection.totalHvAmount;
@ -207,10 +201,7 @@ export default class VirtualSummary extends BasePage {
const totalMoAmount = firstSelection.totalMoAmount; // const totalMoAmount = firstSelection.totalMoAmount; //
console.log('2222', 2222222222222222222); console.log('2222', 2222222222222222222);
if (inputAmount + totalMoAmount > demand) { if (inputAmount + totalMoAmount > demand) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip14') as string);
icon: 'none',
title: this.$t('message.Pi_tip14') as string,
});
return; return;
} }
console.log(1); console.log(1);
@ -224,10 +215,7 @@ export default class VirtualSummary extends BasePage {
inputAmount <= 0 inputAmount <= 0
// inputAmount.toString().split(".")[1].length > 3 // inputAmount.toString().split(".")[1].length > 3
) { ) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip2') as string);
icon: 'none',
title: this.$t('message.Pi_tip2') as string,
});
} else { } else {
// model.updateSummaryItem({ // model.updateSummaryItem({
// index: this.model.summaryList.findIndex((_: any) => _.checked), // index: this.model.summaryList.findIndex((_: any) => _.checked),
@ -243,7 +231,7 @@ export default class VirtualSummary extends BasePage {
} }
}); });
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.success') as string, title: this.$t('message.success') as string,
}); });
} }
@ -261,10 +249,7 @@ export default class VirtualSummary extends BasePage {
let selectsta = true; let selectsta = true;
console.log('qqq', model.summaryList); console.log('qqq', model.summaryList);
if (model.summaryList.length === 0) { if (model.summaryList.length === 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip4') as string);
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
});
return; return;
} else { } else {
model.summaryList.map((item) => { model.summaryList.map((item) => {
@ -279,17 +264,11 @@ export default class VirtualSummary extends BasePage {
}); });
} }
if (selectsta) { if (selectsta) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip4') as string);
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
});
return; return;
} }
if (qtyStase) { if (qtyStase) {
uni.showToast({ this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
icon: 'none',
title: this.$t('message.Summary_PleaseInputNumber') as string,
});
return; return;
} }
let res = await auth.checkPassword({ let res = await auth.checkPassword({
@ -350,10 +329,11 @@ export default class VirtualSummary extends BasePage {
orderOutIdList: model.proOrderResultList.map((_: any) => _.orderOutId), orderOutIdList: model.proOrderResultList.map((_: any) => _.orderOutId),
}); });
} catch (e) { } catch (e) {
uni.showToast({ this.customToast((this.$t('message.Summary_Tip') as string) + e.message);
icon: 'none', // uni.showToast({
title: (this.$t('message.Summary_Tip') as string) + e.message, // icon: 'none',
}); // title: (this.$t('message.Summary_Tip') as string) + e.message,
// });
} }
} }
} }

Loading…
Cancel
Save