diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index be1295d..51c4347 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -130,7 +130,7 @@ export default { Pi_InputMrp: 'Please input MRP', Pi_InputFactory: 'Please input factory code', Pi_OrderNoNotSelected: 'Order number not selected', - Pi_NoDataFound: 'No data found', + Pi_NoDataFound: 'No Data Found', Pi_QueryResults: 'Query result', Pi_Summary: 'Summary', Pi_ByOrder: 'Order', diff --git a/src/pages/login/area/index.vue b/src/pages/login/area/index.vue index f4aa153..5d77416 100644 --- a/src/pages/login/area/index.vue +++ b/src/pages/login/area/index.vue @@ -92,10 +92,11 @@ export default class AreaPage extends BasePage { async onOk() { const selection: any = area.areas.find((a: any) => a.checked); if (selection === undefined) { - uni.showToast({ - icon: "none", - title: this.$t("message.workArea_SelelctOne") as string, - }); + // uni.showToast({ + // icon: "none", + // title: this.$t("message.workArea_SelelctOne") as string, + // }); + this.customToast(this.$t('message.workArea_SelelctOne') as string); return; } if (selection.warehouseType === "1") { diff --git a/src/pages/login/server/index.vue b/src/pages/login/server/index.vue index 83b7d9a..154617b 100644 --- a/src/pages/login/server/index.vue +++ b/src/pages/login/server/index.vue @@ -90,10 +90,11 @@ export default class ServerPage extends BasePage { try { await server.isServerAlive({ host, port }); } catch (e) { - uni.showToast({ - icon: 'none', - title: this.$t('message.TryAgain') as string, - }); + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.TryAgain') as string, + // }); + this.customToast(this.$t('message.TryAgain') as string); throw e; } server.setServerAddress({ address }); diff --git a/src/pages/product/inbound/finishProductOffline/model.ts b/src/pages/product/inbound/finishProductOffline/model.ts index cc9f63c..6a5b9e0 100644 --- a/src/pages/product/inbound/finishProductOffline/model.ts +++ b/src/pages/product/inbound/finishProductOffline/model.ts @@ -8,6 +8,7 @@ import store from "@/store"; import http from "@/utils/request"; import { url } from "@/utils/url"; import { session } from "@/store/modules/session"; +import vm from '@/main'; // import { order } from '@/pages/raw/handover/kan-dan/model'; class OrderInInfo { stoAmount?: 0; @@ -76,7 +77,8 @@ export class PickingModule extends VuexModule { if (code == "1") { uni.showToast({ icon: "success", title: msg }); } else { - uni.showToast({ icon: "none", title: msg }); + //uni.showToast({ icon: "none", title: msg }); + vm.customToast(msg); } const materielList2 = []; materielList2.push(data); @@ -97,7 +99,8 @@ export class PickingModule extends VuexModule { if (code == "1") { uni.showToast({ icon: "success", title: msg }); } else { - uni.showToast({ icon: "none", title: msg }); + //uni.showToast({ icon: "none", title: msg }); + vm.customToast(msg); } return { code, data }; } diff --git a/src/pages/product/inbound/semiFinishProductOffline2/index.vue b/src/pages/product/inbound/semiFinishProductOffline2/index.vue index e909343..f291cd9 100644 --- a/src/pages/product/inbound/semiFinishProductOffline2/index.vue +++ b/src/pages/product/inbound/semiFinishProductOffline2/index.vue @@ -215,10 +215,11 @@ export default class semiFinishProductOffline2Dom extends BasePage { this.$form.validate(async (valid: boolean) => { if (!valid) return; if (!this.form.aimWl.value) { - uni.showToast({ - icon: 'none', - title: this.$t('message.product_Tip3') as string, - }); + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.product_Tip3') as string, + // }); + this.customToast(this.$t('message.product_Tip3') as string); return; } const list = [ diff --git a/src/pages/product/inbound/semiFinishProductOffline2/model.ts b/src/pages/product/inbound/semiFinishProductOffline2/model.ts index 7b00230..e820c39 100644 --- a/src/pages/product/inbound/semiFinishProductOffline2/model.ts +++ b/src/pages/product/inbound/semiFinishProductOffline2/model.ts @@ -4,6 +4,7 @@ import http from '@/utils/request'; import { url } from '@/utils/url'; import { session } from '@/store/modules/session'; // import { order } from '@/pages/raw/handover/kan-dan/model'; +import vm from '@/main'; class OrderInInfo { stoAmount?: 0; stoNo?: string; //STO采购单号 @@ -63,7 +64,8 @@ export class PickingModule extends VuexModule { if (code == '1') { uni.showToast({ icon: 'success', title: msg }); } else { - uni.showToast({ icon: 'none', title: msg }); + //uni.showToast({ icon: 'none', title: msg }); + vm.customToast(msg); } const orderInInfo = data || {}; return { orderInInfo }; @@ -81,7 +83,8 @@ export class PickingModule extends VuexModule { if (code == '1') { uni.showToast({ icon: 'success', title: msg }); } else { - uni.showToast({ icon: 'none', title: msg }); + //uni.showToast({ icon: 'none', title: msg }); + vm.customToast(msg); } return { code }; } diff --git a/src/pages/product/warehouse/wholeLnventory/model.ts b/src/pages/product/warehouse/wholeLnventory/model.ts index 9fc893f..57ad532 100644 --- a/src/pages/product/warehouse/wholeLnventory/model.ts +++ b/src/pages/product/warehouse/wholeLnventory/model.ts @@ -94,10 +94,11 @@ export class wholeLnventory extends VuexModule { const records: any = await http.post(url.warehouse.wholeLnventory.scanCode, list); if (records.code == 1) { console.log('数据啊啊啊', records); - uni.showToast({ - icon: 'none', - title: vm.$t('message.Warehouse_Tip9') as any, - }); + // uni.showToast({ + // icon: 'none', + // title: vm.$t('message.Warehouse_Tip9') as any, + // }); + vm.customToast(vm.$t('message.Warehouse_Tip9') as any); this.productCode = records.data.productCode; this.productDescZh = records.data.productDescZh; return { records }; diff --git a/src/pages/raw/handover/aggregating/model.ts b/src/pages/raw/handover/aggregating/model.ts index 66e8359..847c6e1 100644 --- a/src/pages/raw/handover/aggregating/model.ts +++ b/src/pages/raw/handover/aggregating/model.ts @@ -3,7 +3,7 @@ import store from '@/store'; import http from '@/utils/request'; import { url } from '@/utils/url'; import { cloneDeep } from 'lodash/fp'; - +import vm from '@/main'; @Module({ namespaced: true, dynamic: true, @@ -192,10 +192,11 @@ export class AggregatingModule extends VuexModule { //console.log(">>>>>?????proOrderList",proOrderList); proOrderList.forEach((_: any) => (_.checked = true)); if (!proOrderList.length) { - uni.showToast({ - icon: 'none', - title: 'No Data Found!', - }); + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); } return { proOrderList }; } @@ -218,10 +219,11 @@ export class AggregatingModule extends VuexModule { async queryAggregateList(params: any) { const { list: aggregateList }: any = await http.post(url.sumscan.query.hzlist, params); if (!aggregateList.length) { - uni.showToast({ - icon: 'none', - title: 'No Data Found!', - }); + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); return { aggregateList }; } return { aggregateList }; @@ -250,10 +252,11 @@ export class AggregatingModule extends VuexModule { async queryAccessoryList(params: any) { const { list: accessoryList }: any = await http.post(url.sumscan.query.fllist, params); if (!accessoryList.length) { - uni.showToast({ - icon: 'none', - title: 'No Data Found!', - }); + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); } return { accessoryList }; } diff --git a/src/pages/raw/handover/feeding/Location.vue b/src/pages/raw/handover/feeding/Location.vue index 678e483..431a9af 100644 --- a/src/pages/raw/handover/feeding/Location.vue +++ b/src/pages/raw/handover/feeding/Location.vue @@ -235,24 +235,27 @@ export default class RawReceiptDetail extends BasePage { } Add() { if (this.qty == '' || this.wlCode == '') { - uni.showToast({ - icon: 'none', - title: this.$t('message.AppendMateriel1') as string, - }); + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.AppendMateriel1') as string, + // }); + this.customToast(this.$t('message.AppendMateriel1') as string); return; } if (parseFloat(this.qty) <= 0) { - uni.showToast({ - icon: 'none', - title: this.$t('message.AppendMateriel2') as string, - }); + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.AppendMateriel2') as string, + // }); + this.customToast(this.$t('message.AppendMateriel2') as string); return; } if (parseFloat(this.qty) > model.blDetailList[this.someIndex].amount) { - uni.showToast({ - icon: 'none', - title: this.$t('message.AppendMateriel3') as string, - }); + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.AppendMateriel3') as string, + // }); + this.customToast(this.$t('message.AppendMateriel3') as string); return; } let num = parseFloat(this.qty); @@ -260,29 +263,32 @@ export default class RawReceiptDetail extends BasePage { num += parseFloat(item.qty); }); if (num > this.model.blDetailList[this.someIndex].amount) { - uni.showToast({ - icon: 'none', - title: this.$t('message.AppendMateriel3') as string, - }); + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.AppendMateriel3') as string, + // }); + this.customToast(this.$t('message.AppendMateriel3') as string); return; } let isTrue: boolean = true; if (this.LocationList.length != 0) { this.model.blDetailList[this.someIndex].wlList.forEach((item: any) => { if (this.wlCode.sendSpot != item.Code) { - uni.showToast({ - icon: 'none', - title: this.$t('message.AppendMateriel4') as string, - }); + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.AppendMateriel4') as string, + // }); + this.customToast(this.$t('message.AppendMateriel4') as string); return (isTrue = false); } }); } if (this.some == {}) { - uni.showToast({ - icon: 'none', - title: this.$t('message.AppendMateriel5') as string, - }); + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.AppendMateriel5') as string, + // }); + this.customToast(this.$t('message.AppendMateriel5') as string); return; } if (isTrue == true) { @@ -366,10 +372,11 @@ 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 string, - }); + // uni.showToast({ + // icon: 'none', + // title: this.$t('message.Commission_tips6') as string, + // }); + this.customToast(this.$t('message.Commission_tips6') as string); return; } let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); diff --git a/src/pages/raw/handover/feeding/detail.vue b/src/pages/raw/handover/feeding/detail.vue index 7c3be35..9cfd20b 100644 --- a/src/pages/raw/handover/feeding/detail.vue +++ b/src/pages/raw/handover/feeding/detail.vue @@ -203,18 +203,20 @@ export default class feedingDel extends BasePage { */ async onUpload() { if (!this.model.hasBlDetailFillAmount) { - uni.showToast({ - icon: "none", - title: this.$t("message.Pi_tip10") as string, - }); + // uni.showToast({ + // icon: "none", + // title: this.$t("message.Pi_tip10") as string, + // }); + this.customToast(this.$t('message.Pi_tip10') as string); return; } const dataList = this.model.blDetailUploadList; if (dataList.length === 0) { - uni.showToast({ - icon: "none", - title: this.$t("message.Pi_tip4") as string, - }); + // uni.showToast({ + // icon: "none", + // title: this.$t("message.Pi_tip4") as string, + // }); + this.customToast(this.$t('message.Pi_tip4') as string); return; } const params = { diff --git a/src/pages/raw/handover/feeding/index.vue b/src/pages/raw/handover/feeding/index.vue index 7ebad27..0e596b4 100644 --- a/src/pages/raw/handover/feeding/index.vue +++ b/src/pages/raw/handover/feeding/index.vue @@ -152,10 +152,11 @@ export default class feedingDom extends BasePage { } await this.model.queryBlDetailList(params); if (this.model.blDetailList.length === 0) { - uni.showToast({ - icon: "none", - title: this.$t("message.Pi_NoDataFound") as string, - }); + // uni.showToast({ + // icon: "none", + // title: this.$t("message.Pi_NoDataFound") as string, + // }); + this.customToast(this.$t('message.Pi_NoDataFound') as string); return; } this.toPage(this.page.raw.handover.feeding.Location); diff --git a/src/pages/raw/handover/picking/model.ts b/src/pages/raw/handover/picking/model.ts index 8d44adc..b3774ba 100644 --- a/src/pages/raw/handover/picking/model.ts +++ b/src/pages/raw/handover/picking/model.ts @@ -3,7 +3,7 @@ import store from '@/store'; import http from '@/utils/request'; import { url } from '@/utils/url'; import { session } from '@/store/modules/session'; - +import vm from '@/main'; @Module({ namespaced: true, dynamic: true, @@ -236,10 +236,11 @@ export class PickingModule extends VuexModule { async queryProOrder(params: any) { const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, params); if (!proOrderList.length) { - uni.showToast({ - icon: 'none', - title: 'No Data Found!', - }); + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); } return { proOrderList }; } @@ -247,10 +248,11 @@ export class PickingModule extends VuexModule { async queryOrder() { const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams); if (!proOrderList.length) { - uni.showToast({ - icon: 'none', - title: 'No Data Found!', - }); + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); } return { proOrderList }; } @@ -283,10 +285,11 @@ export class PickingModule extends VuexModule { async queryAggregateList(params: any) { const { list: aggregateList }: any = await http.post(url.sortscan.query.aggregateList, params); if (!aggregateList.length) { - uni.showToast({ - icon: 'none', - title: 'No Data Found!', - }); + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); } aggregateList.forEach((_: any) => (_.loginName = params.loginName)); return { aggregateList }; diff --git a/src/pages/raw/handover/virtual/model.ts b/src/pages/raw/handover/virtual/model.ts index ff7d6c5..65898f6 100644 --- a/src/pages/raw/handover/virtual/model.ts +++ b/src/pages/raw/handover/virtual/model.ts @@ -9,7 +9,7 @@ import { import store from '@/store'; import http from '@/utils/request'; import { url } from '@/utils/url'; - +import vm from '@/main'; export interface SummaryItem { checked: any; materialCode: string; @@ -117,10 +117,11 @@ export class VirtualModule extends VuexModule { const proOrderList = values.map((v: string) => ({ prdOrder: v })); proOrderList.forEach((_: any) => (_.checked = true)); if (!proOrderList.length) { - uni.showToast({ - icon: 'none', - title: 'No data found!', - }); + // uni.showToast({ + // icon: 'none', + // title: 'No data found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); } return { proOrderList }; } diff --git a/src/pages/raw/warehouse/rowCollect/model.ts b/src/pages/raw/warehouse/rowCollect/model.ts index b9c325b..6d0a362 100644 --- a/src/pages/raw/warehouse/rowCollect/model.ts +++ b/src/pages/raw/warehouse/rowCollect/model.ts @@ -63,7 +63,8 @@ export class rowCollect extends VuexModule { console.log('获取来的数据', orderInInfoList); return { orderInInfoList, code }; } catch { - uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any }); + //uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any }); + vm.customToast(vm.$t('message.Warehouse_Tip11') as any); } } diff --git a/src/pages/raw/warehouse/rowScrap/model.ts b/src/pages/raw/warehouse/rowScrap/model.ts index 0793fb4..6945c64 100644 --- a/src/pages/raw/warehouse/rowScrap/model.ts +++ b/src/pages/raw/warehouse/rowScrap/model.ts @@ -63,7 +63,8 @@ export class rowScrap extends VuexModule { console.log('获取来的数据', orderInInfoList); return { orderInInfoList, code }; } catch { - uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any }); + //uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any }); + vm.customToast(vm.$t('message.Warehouse_Tip11') as any); } } diff --git a/src/pages/raw/warehouse/rowTransfer/model.ts b/src/pages/raw/warehouse/rowTransfer/model.ts index ce7f7fc..26cb7c0 100644 --- a/src/pages/raw/warehouse/rowTransfer/model.ts +++ b/src/pages/raw/warehouse/rowTransfer/model.ts @@ -70,7 +70,8 @@ export class rowTransfer extends VuexModule { })); return { orderInInfoList, materielList, code }; } catch { - uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any }); + //uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any }); + vm.customToast(vm.$t('message.Warehouse_Tip11') as any); } }