diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 0ecedc6..ae74edf 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -170,7 +170,11 @@ export default { ModelCode: '型号编码', ModelName: '型号名称', ModelScanned: '型号已扫', - + Pi_tip13: '请选择要提交的物料', + Pi_tip15: '请确保交接数量等于需求数量', + Pi_tip16: '只能选择一个DN单', + Pi_tip17: '请选择一条DN单', + Pi_tip18: '请选中要移库的数据', //汇总交接 Summary_Query: '汇总查询', Summary_Contain: '包含', diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 284cd4d..5ebec22 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -27,6 +27,11 @@ export default { error: 'Error', successful: 'Query was successful', operation: 'Operation', + Pi_tip13: 'Please select the material to submit', + Pi_tip15: 'Please ensure that the handover quantity is equal to the demand quantity', + Pi_tip16: 'You can only select one DN list', + Pi_tip17: 'Please select a dn list', + Pi_tip18: 'Please select the data to be moved', //版本更新 updatePrompt: 'Update tips', Tip1: 'New version detected, update?', diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue index b4fdf26..70c9321 100644 --- a/src/pages/raw/commission/entrant/index.vue +++ b/src/pages/raw/commission/entrant/index.vue @@ -146,10 +146,7 @@ export default class dnReceiptDom extends BasePage { //输入单号 查询数据 async query() { if (this.form.documentNo == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips1') as any, - }); + this.customToast(this.$t('message.Commission_tips1') as any); return; } this.materialList = []; @@ -179,24 +176,15 @@ export default class dnReceiptDom extends BasePage { //点击添加 Add() { if (this.nowAmount == '' || this.wlCode == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips2') as any, - }); + this.customToast(this.$t('message.Commission_tips2') as any); return; } if (parseFloat(this.nowAmount) <= 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips3') as any, - }); + this.customToast(this.$t('message.Commission_tips3') as any); return; } if (parseFloat(this.nowAmount) > this.every.poAmount) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips4') as any, - }); + this.customToast(this.$t('message.Commission_tips4') as any); return; } let arr = { @@ -212,10 +200,7 @@ export default class dnReceiptDom extends BasePage { } async onSubmit() { if (this.list == null || this.list.length == 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips5') as any, - }); + this.customToast(this.$t('message.Commission_tips5') as any); } let upload = { poNo: this.form.documentNo, @@ -233,10 +218,7 @@ export default class dnReceiptDom extends BasePage { } async bill() { if (this.form.documentNo == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message._tips6') as any, - }); + this.customToast(this.$t('message._tips6') as any) return; } let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); @@ -249,7 +231,7 @@ export default class dnReceiptDom extends BasePage { } //添加和删除操作的时候 计算累计收货数量 business() { - let num: number = 0; + let num = 0; this.list.forEach((item: any) => { num += parseFloat(item.nowAmount); }); diff --git a/src/pages/raw/commission/goOut/index.vue b/src/pages/raw/commission/goOut/index.vue index aca80dc..5d27540 100644 --- a/src/pages/raw/commission/goOut/index.vue +++ b/src/pages/raw/commission/goOut/index.vue @@ -158,10 +158,7 @@ export default class dnReceiptDom extends BasePage { this.every = ''; this.materialList = []; if (this.form.documentNo == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips1') as any, - }); + this.customToast(this.$t('message.Commission_tips1') as any); return; } this.materialList = []; @@ -192,24 +189,15 @@ export default class dnReceiptDom extends BasePage { //点击添加 Add() { if (!this.every) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips6') as any, - }); + this.customToast(this.$t('message.Commission_tips6') as any); return; } if (this.nowAmount == '' || this.wlCode == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips2') as any, - }); + this.customToast(this.$t('message.Commission_tips2') as any); return; } if (parseFloat(this.nowAmount) <= 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips3') as any, - }); + this.customToast(this.$t('message.Commission_tips3') as any); return; } let num: number = parseFloat(this.nowAmount); @@ -261,10 +249,7 @@ export default class dnReceiptDom extends BasePage { } async onSubmit() { if (this.list == null || this.list.length == 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips5') as any, - }); + this.customToast(this.$t('message.Commission_tips5') as any); } // let upload = { // poNo: this.form.documentNo, @@ -278,10 +263,7 @@ export default class dnReceiptDom extends BasePage { } async bill() { if (this.form.documentNo == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message._tips6') as any, - }); + this.customToast(this.$t('message._tips6') as any); return; } let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); @@ -295,7 +277,7 @@ export default class dnReceiptDom extends BasePage { } //添加和删除操作的时候 计算累计收货数量 business() { - let num: number = 0; + let num = 0; this.list.forEach((item: any) => { num += parseFloat(item.nowAmount); }); diff --git a/src/pages/raw/handover/aggregating/index.vue b/src/pages/raw/handover/aggregating/index.vue index 4bd735a..ff8153c 100644 --- a/src/pages/raw/handover/aggregating/index.vue +++ b/src/pages/raw/handover/aggregating/index.vue @@ -256,10 +256,10 @@ export default class Aggregating extends BasePage { materialList = this.model.checkedProOrderList.map((_: any) => _.materialCode); } 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; } 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; } const params = { diff --git a/src/pages/raw/handover/aggregating/order.vue b/src/pages/raw/handover/aggregating/order.vue index aa2d307..2612b67 100644 --- a/src/pages/raw/handover/aggregating/order.vue +++ b/src/pages/raw/handover/aggregating/order.vue @@ -177,10 +177,7 @@ export default class AggregatingOrder extends BasePage { if (!valid) return; const firstSelection = this.model.orderList.find((_) => _.checked); if (firstSelection === undefined) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip7') as string, - }); + this.customToast(this.$t('message.Pi_tip7') as string); } else { // 本次交接数量 const currentPickNum = parseFloat(this.amountForm.amount); @@ -189,10 +186,7 @@ export default class AggregatingOrder extends BasePage { // 拣配数量 const totalMoAmount = parseFloat(firstSelection.totalMoAmount); if (currentPickNum != totalMoAmount) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip12') as string, - }); + this.customToast(this.$t('message.Pi_tip12') as string); return; } model.setOrderListItemHvAmount({ @@ -206,10 +200,7 @@ export default class AggregatingOrder extends BasePage { this.$submitForm.validate(async (valid) => { if (valid) { if (model.orderList.length === 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip4') as string, - }); + this.customToast(this.$t('message.Pi_tip4') as string); } else { await auth.checkPassword({ rfPwd: this.submitForm.password, @@ -230,17 +221,11 @@ export default class AggregatingOrder extends BasePage { } }); if (selectsta) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip4') as string, - }); + this.customToast(this.$t('message.Pi_tip4') as string); return; } if (submit) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Summary_PleaseInputNumber') as string, - }); + this.customToast(this.$t('message.Summary_PleaseInputNumber') as string); return; } let List: any = []; @@ -251,10 +236,7 @@ export default class AggregatingOrder extends BasePage { } }); if (List.length == 0) { - uni.showToast({ - icon: 'none', - title: '请先选择要提交的物料' as string, - }); + this.customToast(this.$t('message.Pi_tip13') as string); return; } List.forEach((item: any) => { @@ -264,10 +246,7 @@ export default class AggregatingOrder extends BasePage { } }); if (isTrue != true) { - uni.showToast({ - icon: 'none', - title: '请确保交接数量等于需求数量' as string, - }); + this.customToast(this.$t('message.Pi_tip15') as string); return; } await model.uploadOrderList({ @@ -323,10 +302,11 @@ export default class AggregatingOrder extends BasePage { orderOutIdList, }); } catch (e) { - uni.showToast({ - icon: 'none', - title: (this.$t('message.Summary_Tip') as string) + e.message, - }); + this.customToast((this.$t('message.Summary_Tip') as string) + e.message); + // uni.showToast({ + // icon: 'none', + // title: (this.$t('message.Summary_Tip') as string) + e.message, + // }); } } } diff --git a/src/pages/raw/handover/aggregating/summary.vue b/src/pages/raw/handover/aggregating/summary.vue index 55bf6e9..b42798e 100644 --- a/src/pages/raw/handover/aggregating/summary.vue +++ b/src/pages/raw/handover/aggregating/summary.vue @@ -176,10 +176,7 @@ export default class AggregatingSummary extends BasePage { if (!valid) return; const firstSelection = this.model.aggregateList.find((_) => _.checked); if (firstSelection === undefined) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip7') as string, - }); + this.customToast(this.$t('message.Pi_tip7') as string); } else { // 本次交接数量 const currentPickNum = parseFloat(this.amountForm.amount); @@ -188,10 +185,7 @@ export default class AggregatingSummary extends BasePage { // 拣配数量 const totalMoAmount = parseFloat(firstSelection.totalMoAmount); if (currentPickNum != totalMoAmount) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip12') as string, - }); + this.customToast(this.$t('message.Pi_tip12') as string); return; } model.setAggregateListItemHvAmount({ @@ -209,10 +203,7 @@ export default class AggregatingSummary extends BasePage { this.$submitForm.validate(async (valid) => { if (valid) { if (model.aggregateList.length === 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip4') as string, - }); + this.customToast(this.$t('message.Pi_tip4') as string); } else { await auth.checkPassword({ rfPwd: this.submitForm.password, @@ -232,17 +223,11 @@ export default class AggregatingSummary extends BasePage { } }); if (selectsta) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip4') as string, - }); + this.customToast(this.$t('message.Pi_tip4') as string); return; } if (submit) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Summary_PleaseInputNumber') as string, - }); + this.customToast(this.$t('message.Summary_PleaseInputNumber') as string); return; } let List: any = []; @@ -253,10 +238,7 @@ export default class AggregatingSummary extends BasePage { } }); if (List.length == 0) { - uni.showToast({ - icon: 'none', - title: '请先选择要提交的物料' as string, - }); + this.customToast(this.$t('message.Pi_tip13') as string); return; } List.forEach((item: any) => { @@ -266,10 +248,7 @@ export default class AggregatingSummary extends BasePage { } }); if (isTrue != true) { - uni.showToast({ - icon: 'none', - title: '请确保交接数量等于需求数量' as string, - }); + this.customToast(this.$t('message.Pi_tip15') as string); return; } await model.uploadAggregateList({ @@ -328,10 +307,7 @@ export default class AggregatingSummary extends BasePage { orderOutIdList, }); } catch (e) { - uni.showToast({ - icon: 'none', - title: (this.$t('message.Summary_Tip') as string) + e.message, - }); + this.customToast((this.$t('message.Summary_Tip') as string) + e.message); } } } diff --git a/src/pages/raw/handover/picking/ByOrder.vue b/src/pages/raw/handover/picking/ByOrder.vue index b15b119..297c8d2 100644 --- a/src/pages/raw/handover/picking/ByOrder.vue +++ b/src/pages/raw/handover/picking/ByOrder.vue @@ -173,34 +173,22 @@ export default class RawReceiptDetail extends BasePage { } Add() { if (this.qty == '' || this.wlCode == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips2') as any, - }); + this.customToast(this.$t('message.Commission_tips2') as any); return; } if (parseFloat(this.qty) <= 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips3') as any, - }); + this.customToast(this.$t('message.Commission_tips3') as any); return; } if (JSON.stringify(this.some) == '{}') { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips6') as any, - }); + this.customToast(this.$t('message.Commission_tips6') as any); return; } - let isTrue: boolean = true; + let isTrue = true; if (this.LocationList.length != 0) { this.LocationList.forEach((item: any) => { if (this.wlCode.sendSpot != item.Code || this.wlCode.label === item.wlCode) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips7') as any, - }); + this.customToast(this.$t('message.Commission_tips7') as any); return (isTrue = false); } }); @@ -268,10 +256,7 @@ export default class RawReceiptDetail extends BasePage { } async bill() { if (this.some == {} || this.some.prdOrder == null) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips6') as any, - }); + this.customToast(this.$t('message.Commission_tips6') as any); return; } 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) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Warehouse_Tip6') as any, - }); + this.customToast(this.$t('message.Warehouse_Tip6') as any); return; } await this.model.saveProOrderResultUpload(dataList); if (this.model.code == '1') { uni.showToast({ - icon: 'none', + icon: 'success', title: this.$t('message.Warehouse_Tip9') as any, }); this.GetLocation(); diff --git a/src/pages/raw/handover/picking/BySummary.vue b/src/pages/raw/handover/picking/BySummary.vue index d4ff2c6..499ca19 100644 --- a/src/pages/raw/handover/picking/BySummary.vue +++ b/src/pages/raw/handover/picking/BySummary.vue @@ -143,6 +143,8 @@ export default class RawReceiptDetail extends BasePage { if (!this.model.aggregateList[data[0].index].sendSpot) { uni.showModal({ content: this.$t('message.SAPLocation') as any, + confirmText: this.$t('message.workArea_Confirm') as string, + cancelText: this.$t('message.Cancel') as string, success: (res) => { if (res.confirm) { this.model.aggregateList[data[0].index].checked = false; @@ -161,35 +163,23 @@ export default class RawReceiptDetail extends BasePage { //添加库位和数量到数据和表格中 Add() { if (this.qty == '' || this.wlCode == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips2') as any, - }); + this.customToast(this.$t('message.Commission_tips2') as any); return; } if (parseFloat(this.qty) <= 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips3') as any, - }); + this.customToast(this.$t('message.Commission_tips3') as any); return; } //guoshuang 判断对象为空修改 逻辑:订单勾选校验 if (JSON.stringify(this.some) == '{}') { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips6') as any, - }); + this.customToast(this.$t('message.Commission_tips6') as any); return; } - let isTrue: boolean = true; + let isTrue = true; if (this.LocationList.length != 0) { this.LocationList.forEach((item: any) => { if (this.wlCode.sendSpot != item.Code) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips7') as any, - }); + this.customToast(this.$t('message.Commission_tips7') as any); return (isTrue = false); } }); @@ -270,10 +260,7 @@ export default class RawReceiptDetail extends BasePage { } }); if (dataList.length == 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Warehouse_Tip6') as any, - }); + this.customToast(this.$t('message.Warehouse_Tip6') as any); return; } const params = { @@ -284,10 +271,7 @@ export default class RawReceiptDetail extends BasePage { }; await this.model.saveAggregateUpload(params); if (this.model.code == '1') { - uni.showToast({ - icon: 'none', - title: this.$t('message.Warehouse_Tip9') as any, - }); + this.customToast(this.$t('message.Warehouse_Tip9') as any); this.GetLocation(); setTimeout(() => { this.onAggregate(); diff --git a/src/pages/raw/handover/picking/Summary-details.vue b/src/pages/raw/handover/picking/Summary-details.vue index c4da29e..3fad6b0 100644 --- a/src/pages/raw/handover/picking/Summary-details.vue +++ b/src/pages/raw/handover/picking/Summary-details.vue @@ -35,10 +35,7 @@ export default class RawReceiptDetail extends BasePage { } async generate() { if (this.prdOrder == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message._tips6') as any, - }); + this.customToast(this.$t('message._tips6') as any); return; } let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); diff --git a/src/pages/raw/handover/picking/index.vue b/src/pages/raw/handover/picking/index.vue index d31ac5d..66e7f30 100644 --- a/src/pages/raw/handover/picking/index.vue +++ b/src/pages/raw/handover/picking/index.vue @@ -173,16 +173,10 @@ export default class pickingDom extends BasePage { orderOutIdList = this.model.checkedProOrderList.map((_: any) => _.orderOutId); } if (orderOutIdList.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; } else if (orderOutIdList.length === 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_NoDataFound') as string, - }); + this.customToast(this.$t('message.Pi_NoDataFound') as string); return; } const params = { diff --git a/src/pages/raw/handover/returning/Time-filter.vue b/src/pages/raw/handover/returning/Time-filter.vue index 8024689..9e0978e 100644 --- a/src/pages/raw/handover/returning/Time-filter.vue +++ b/src/pages/raw/handover/returning/Time-filter.vue @@ -116,10 +116,7 @@ export default class returningDom extends BasePage { } async onSubmit() { if (this.startMobile == '' || this.endMobile == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message.time') as string, - }); + this.customToast(this.$t('message.time') as string); return; } let time = { diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue index f151a64..98b9af2 100644 --- a/src/pages/raw/handover/returning/index.vue +++ b/src/pages/raw/handover/returning/index.vue @@ -218,18 +218,12 @@ export default class returningDom extends BasePage { */ onSubmit() { if (this.form.amount > this.model.orderInInfo.amount) { - uni.showToast({ - icon: 'none', - title: this.$t('message.return_Tip4') as string, - }); + this.customToast(this.$t('message.return_Tip4') as string); } else { this.$form.validate(async (valid: boolean) => { if (!valid) return; if (!this.model.orderInInfo.sapFactoryCode) { - uni.showToast({ - icon: 'none', - title: this.$t('message.return_Tip2') as string, - }); + this.customToast(this.$t('message.return_Tip2') as string); } // (this.form.sendSpot as any) = this.model.orderInInfo.sendSpot; (this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode; diff --git a/src/pages/raw/handover/virtual/index.vue b/src/pages/raw/handover/virtual/index.vue index 433674a..acd7507 100644 --- a/src/pages/raw/handover/virtual/index.vue +++ b/src/pages/raw/handover/virtual/index.vue @@ -286,10 +286,10 @@ export default class Virtual extends BasePage { orderNoList = this.model.checkedProOrderList.map((_: any) => _.prdOrder); } 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; } 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; } const params = { diff --git a/src/pages/raw/handover/virtual/model.ts b/src/pages/raw/handover/virtual/model.ts index 3cb2c78..ff7d6c5 100644 --- a/src/pages/raw/handover/virtual/model.ts +++ b/src/pages/raw/handover/virtual/model.ts @@ -119,7 +119,7 @@ export class VirtualModule extends VuexModule { if (!proOrderList.length) { uni.showToast({ icon: 'none', - title: '未查询到数据!', + title: 'No data found!', }); } return { proOrderList }; diff --git a/src/pages/raw/handover/virtual/summary.vue b/src/pages/raw/handover/virtual/summary.vue index 6e5769b..870c1b7 100644 --- a/src/pages/raw/handover/virtual/summary.vue +++ b/src/pages/raw/handover/virtual/summary.vue @@ -176,10 +176,7 @@ export default class VirtualSummary extends BasePage { // 检查 const firstRecord = model.summaryList[0]; if (firstRecord === undefined) { - uni.showToast({ - icon: 'none', - title: this.$t('message.LBWK') as string, - }); + this.customToast(this.$t('message.LBWK') as string); return; } console.log('firstRecord', firstRecord); @@ -196,10 +193,7 @@ export default class VirtualSummary extends BasePage { // 改数 const firstSelection = this.model.summaryList.find((_: any) => _.checked); if (firstSelection === undefined) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip7') as string, - }); + this.customToast(this.$t('message.Pi_tip7') as string); } else { const inputAmount = parseFloat(this.amountForm.amount); //本次交接数量 const totalHvAmount = firstSelection.totalHvAmount; @@ -207,10 +201,7 @@ export default class VirtualSummary extends BasePage { const totalMoAmount = firstSelection.totalMoAmount; //累计拣配数量 console.log('2222', 2222222222222222222); if (inputAmount + totalMoAmount > demand) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip14') as string, - }); + this.customToast(this.$t('message.Pi_tip14') as string); return; } console.log(1); @@ -224,10 +215,7 @@ export default class VirtualSummary extends BasePage { inputAmount <= 0 // inputAmount.toString().split(".")[1].length > 3 ) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip2') as string, - }); + this.customToast(this.$t('message.Pi_tip2') as string); } else { // model.updateSummaryItem({ // index: this.model.summaryList.findIndex((_: any) => _.checked), @@ -243,7 +231,7 @@ export default class VirtualSummary extends BasePage { } }); uni.showToast({ - icon: 'none', + icon: 'success', title: this.$t('message.success') as string, }); } @@ -261,10 +249,7 @@ export default class VirtualSummary extends BasePage { let selectsta = true; console.log('qqq', model.summaryList); if (model.summaryList.length === 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip4') as string, - }); + this.customToast(this.$t('message.Pi_tip4') as string); return; } else { model.summaryList.map((item) => { @@ -279,17 +264,11 @@ export default class VirtualSummary extends BasePage { }); } if (selectsta) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Pi_tip4') as string, - }); + this.customToast(this.$t('message.Pi_tip4') as string); return; } if (qtyStase) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Summary_PleaseInputNumber') as string, - }); + this.customToast(this.$t('message.Summary_PleaseInputNumber') as string); return; } let res = await auth.checkPassword({ @@ -350,10 +329,11 @@ export default class VirtualSummary extends BasePage { orderOutIdList: model.proOrderResultList.map((_: any) => _.orderOutId), }); } catch (e) { - uni.showToast({ - icon: 'none', - title: (this.$t('message.Summary_Tip') as string) + e.message, - }); + this.customToast((this.$t('message.Summary_Tip') as string) + e.message); + // uni.showToast({ + // icon: 'none', + // title: (this.$t('message.Summary_Tip') as string) + e.message, + // }); } } } diff --git a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue index d995803..f3edb94 100644 --- a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue +++ b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue @@ -159,16 +159,13 @@ export default class dnReceiptDom extends BasePage { //输入单号 查询数据 async query() { if (!this.form.documentNo) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips1') as any, - }); + this.customToast(this.$t('message.Commission_tips1') as any); return; } await this.model.ImportQueryOrderInfo(this.form.documentNo.trim()); if (model.code == '1') { uni.showToast({ - icon: 'none', + icon: 'success', title: this.$t('message.successful') as any, }); console.log('orderInInfoList', this.model.orderInInfoList); @@ -264,33 +261,21 @@ export default class dnReceiptDom extends BasePage { // const count = this.totalLocation(this.LocationList); const count = parseFloat(this.every.requestAmount); if (this.receiptAmount == '' || !this.wl.value) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips2') as any, - }); + this.customToast(this.$t('message.Commission_tips2') as any); return; } if (parseFloat(this.receiptAmount) <= 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips3') as any, - }); + this.customToast(this.$t('message.Commission_tips3') as any); return; } if (parseFloat(this.receiptAmount) > count || parseFloat(this.receiptAmount) + parseFloat(this.every.receiptAmount) > count) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips4') as any, - }); + this.customToast(this.$t('message.Commission_tips4') as any); return; } let isTrue = true; this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => { if (item.wlCode == this.wl.label && item.receiptAmount == this.receiptAmount) { - uni.showToast({ - icon: 'none', - title: this.$t('message.repeatedly') as any, - }); + this.customToast(this.$t('message.repeatedly') as any); return (isTrue = false); } }); @@ -369,10 +354,7 @@ export default class dnReceiptDom extends BasePage { } async onSubmit() { if (this.LocationList.length === 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips5') as any, - }); + this.customToast(this.$t('message.Commission_tips5') as any); return null; } await this.model.submitOrderInEnter(this.DNReceivingList); @@ -380,10 +362,7 @@ export default class dnReceiptDom extends BasePage { } async bill() { if (this.form.documentNo == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message._tips6') as any, - }); + this.customToast(this.$t('message._tips6') as any); return; } let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); diff --git a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue index 917965e..9206133 100644 --- a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue +++ b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue @@ -160,16 +160,13 @@ export default class dnReceiptDom extends BasePage { //输入单号 查询数据 async query() { if (!this.form.documentNo) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips1') as any, - }); + this.customToast(this.$t('message.Commission_tips1') as any); return; } await this.model.queryOrderInInfo(this.form.documentNo.trim()); if (model.code == '1') { uni.showToast({ - icon: 'none', + icon: 'success', title: this.$t('message.successful') as any, }); console.log('orderInInfoList', this.model.orderInInfoList); @@ -265,33 +262,21 @@ export default class dnReceiptDom extends BasePage { // const count = this.totalLocation(this.LocationList); const count = parseFloat(this.every.requestAmount); if (this.receiptAmount == '' || !this.wl.value) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips2') as any, - }); + this.customToast(this.$t('message.Commission_tips2') as any); return; } if (parseFloat(this.receiptAmount) <= 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips3') as any, - }); + this.customToast(this.$t('message.Commission_tips3') as any); return; } if (parseFloat(this.receiptAmount) > count || parseFloat(this.receiptAmount) + parseFloat(this.every.receiptAmount) > count) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips4') as any, - }); + this.customToast(this.$t('message.Commission_tips4') as any); return; } let isTrue = true; this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => { if (item.wlCode == this.wl.label && item.receiptAmount == this.receiptAmount) { - uni.showToast({ - icon: 'none', - title: this.$t('message.repeatedly') as any, - }); + this.customToast(this.$t('message.repeatedly') as any); return (isTrue = false); } }); @@ -370,10 +355,7 @@ export default class dnReceiptDom extends BasePage { } async onSubmit() { if (this.LocationList.length === 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.Commission_tips5') as any, - }); + this.customToast(this.$t('message.Commission_tips5') as any); return null; } await this.model.submitOrderInEnter(this.DNReceivingList); @@ -381,10 +363,7 @@ export default class dnReceiptDom extends BasePage { } async bill() { if (this.form.documentNo == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message._tips6') as any, - }); + this.customToast(this.$t('message._tips6') as any); return; } let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); diff --git a/src/pages/raw/ingoods/dnReturnGoods/Local-details.vue b/src/pages/raw/ingoods/dnReturnGoods/Local-details.vue index 222b0d7..dcbcc87 100644 --- a/src/pages/raw/ingoods/dnReturnGoods/Local-details.vue +++ b/src/pages/raw/ingoods/dnReturnGoods/Local-details.vue @@ -49,11 +49,8 @@ export default class RawReceiptDetail extends BasePage { headers = headers; poNo: any = ""; async generate() { - if (this.poNo == "") { - uni.showToast({ - icon: "none", - title: this.$t("message._tips6") as any, - }); + if (this.poNo == '') { + this.customToast(this.$t('message._tips6') as any); return; } let content = { diff --git a/src/pages/raw/ingoods/dnReturnGoods/Location.vue b/src/pages/raw/ingoods/dnReturnGoods/Location.vue index 1dac32b..aa958bc 100644 --- a/src/pages/raw/ingoods/dnReturnGoods/Location.vue +++ b/src/pages/raw/ingoods/dnReturnGoods/Location.vue @@ -4,78 +4,51 @@ - {{ $t("message.rawMenu_ReturnGoods") }} + {{ $t('message.rawMenu_ReturnGoods') }} - + - {{ $t("message.return_Type") }}: + {{ $t('message.return_Type') }}: {{ some.poType }} - {{ $t("message.po_ReturnGoodsQuantity") }}: + {{ $t('message.po_ReturnGoodsQuantity') }}: {{ some.poAmount }} - {{ $t("message.CommissionedLocation") }}: - + {{ $t('message.CommissionedLocation') }}: + - {{ - $t("message.CommissionedThisNumber") - }} + {{ $t('message.CommissionedThisNumber') }} - {{ - $t("message.product_add") - }} + {{ $t('message.product_add') }} - {{ $t("message.product_Location") }} - {{ $t("message.product_Number") }} - {{ $t("message.operation") }} + {{ $t('message.product_Location') }} + {{ $t('message.product_Number') }} + {{ $t('message.operation') }} {{ item.wlCode }} {{ item.qty }}
- {{ $t("message.product_Delete") }} + {{ $t('message.product_Delete') }}
@@ -89,18 +62,16 @@
- {{ - $t("message.detailed") - }} + {{ $t('message.detailed') }} - {{ $t("message.po_Submit") }} + {{ $t('message.po_Submit') }} - {{ $t("message.po_Return") }} + {{ $t('message.po_Return') }} @@ -110,13 +81,13 @@