diff --git a/.eslintrc.js b/.eslintrc.js
index 44c85c1..e651868 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -6,6 +6,7 @@ module.exports = {
extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/typescript/recommended', '@vue/prettier', '@vue/prettier/@typescript-eslint'],
globals: {
uni: true,
+ plus: true,
},
parserOptions: {
ecmaVersion: 2020,
diff --git a/.gitignore b/.gitignore
index 2561bb4..c31d257 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,7 +15,6 @@ yarn-error.log*
# Editor directories and files
.project
.idea
-.vscode
*.suo
*.ntvs*
*.njsproj
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..4beef3a
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,85 @@
+{
+ "i18n-ally.localesPaths": ["src/i18n", "src/i18n/lang"],
+ "i18n-ally.displayLanguage": "zh",
+ "workbench.iconTheme": "material-icon-theme",
+ "git.enableSmartCommit": true,
+ "git.autofetch": true,
+ "files.associations": {
+ "*.js": "javascriptreact",
+ "*.cjson": "jsonc",
+ "*.wxss": "css",
+ "*.wxs": "javascript",
+ "*.ejs": "plaintext"
+ },
+ "[javascript]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[vue]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[json]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[html]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ // 代码格式化
+
+ "editor.fontSize": 12,
+ "editor.tabSize": 2,
+ "editor.codeActionsOnSave": {
+ "source.fixAll": false
+ },
+ "editor.formatOnSave": false,
+ "[jsonc]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "window.zoomLevel": 0,
+ "liveServer.settings.donotShowInfoMsg": true,
+ "javascript.updateImportsOnFileMove.enabled": "always",
+ "editor.detectIndentation": false,
+ "explorer.confirmDelete": false,
+ "[javascriptreact]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ // 头部注释
+ "fileheader.customMade": {
+ // 头部注释默认字段
+ "Author": "zhou lei",
+ "Date": "Do not edit", // 设置后默认设置文件生成时间
+ "LastEditTime": "Do not edit", // 设置后,保存文件更改默认更新最后编辑时间
+ "LastEditors": "zhou lei", // 设置后,保存文件更改默认更新最后编辑人
+ "Description": "",
+ "FilePath": "Do not edit", // 设置后,默认生成文件相对于项目的路径
+ "custom_string_obkoro1": "联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司"
+ },
+ "[css]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[typescript]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "editor.quickSuggestions": {
+ "strings": true
+ },
+ "emmet.includeLanguages": {
+ "wxml": "html",
+ "vue-html": "html"
+ },
+ "emmet.syntaxProfiles": {
+ "postcss": "css"
+ },
+ "emmet.triggerExpansionOnTab": true,
+ "tailwindCSS.emmetCompletions": true,
+ "tailwindCSS.validate": true,
+ "minapp-vscode.disableAutoConfig": true,
+ "[scss]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "liveServer.settings.donotVerifyTags": true,
+ "diffEditor.ignoreTrimWhitespace": false,
+ "redhat.telemetry.enabled": true,
+ "gitlens.advanced.messages": {
+ "suppressGitMissingWarning": true
+ }
+}
diff --git a/package.json b/package.json
index d7d3445..5456d09 100644
--- a/package.json
+++ b/package.json
@@ -87,7 +87,9 @@
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-29820201110001",
"@dcloudio/webpack-uni-mp-loader": "^2.0.0-29820201110001",
"@dcloudio/webpack-uni-pages-loader": "^2.0.0-29820201110001",
+ "@types/html5plus": "^1.0.2",
"@types/lodash": "^4.14.165",
+ "@types/uni-app": "^1.4.4",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
"@vue/cli-plugin-babel": "~4.5.0",
diff --git a/src/App.vue b/src/App.vue
index c997206..c1c7c48 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,30 +1,82 @@
+
diff --git a/src/components/base/page.ts b/src/components/base/page.ts
index b1d1678..69268c6 100644
--- a/src/components/base/page.ts
+++ b/src/components/base/page.ts
@@ -1,7 +1,17 @@
-import { Component, Vue } from "vue-property-decorator";
-import { page } from "@/utils/page";
-import { session } from "@/store/modules/session";
-import { image } from "@/utils/image";
+/*
+ * @Author: zhou lei
+ * @Date: 2021-11-08 17:12:53
+ * @LastEditTime: 2022-01-20 11:57:05
+ * @LastEditors: zhou lei
+ * @Description:
+ * @FilePath: /wms_haiwai_app/src/components/base/page.ts
+ * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
+ */
+import { Component, Vue } from 'vue-property-decorator';
+import { page } from '@/utils/page';
+import { session } from '@/store/modules/session';
+import { image } from '@/utils/image';
+
@Component
export class BasePage extends Vue {
/**
diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts
index 5f434ae..0ecedc6 100644
--- a/src/i18n/lang/cn.ts
+++ b/src/i18n/lang/cn.ts
@@ -27,6 +27,8 @@ export default {
//版本更新
updatePrompt: '更新提示',
Tip1: '检测到有新版本,是否更新?',
+ restart: '重启',
+ Tip2: '更新成功,是否重启?',
//服务器设置
ServerSetting: '服务器设置',
PleaseInputIPAddress: '请输入IP地址',
diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts
index 3d58531..284cd4d 100644
--- a/src/i18n/lang/en.ts
+++ b/src/i18n/lang/en.ts
@@ -25,11 +25,13 @@ export default {
Inventory_query: 'Inventory query',
success: 'Success',
error: 'Error',
- successful: 'query was successful',
- operation: 'operation',
+ successful: 'Query was successful',
+ operation: 'Operation',
//版本更新
updatePrompt: 'Update tips',
Tip1: 'New version detected, update?',
+ restart: 'Restart',
+ Tip2: 'Update succeeded. Are you sure to restart?',
//服务器设置
ServerSetting: 'Server Setting',
PleaseInputIPAddress: 'Please input IP address',
@@ -41,7 +43,7 @@ export default {
workArea_Title: 'Work area list',
workArea_SubTitle: 'Hello, Please select your work area from the list~',
workArea_SelelctOne: 'Please select one work area from the list',
- workArea_Selelct: 'selelct',
+ workArea_Selelct: 'Selelct',
workArea_Warehouse: 'WH',
workArea_WarehouseName: 'WH name',
workArea_RegionName: 'Region name',
@@ -130,7 +132,7 @@ export default {
Pi_upload: 'Upload',
Pi_tip1: 'Please input the pick Qty',
Pi_tip2: 'The pick up Qty is an greater than 0',
- detailed: 'detailed',
+ detailed: 'Detailed',
Pi_tip3: 'Please update the pick up Qty before uploading',
Pi_tip10: 'Please update the append Qty before uploading',
Pi_tip4: 'No data available to upload',
@@ -150,7 +152,7 @@ export default {
Pi_CurrentPickingQuantity: 'Current Pick up Qty',
Pi_PickedQuantity: 'Picked Qty',
Pi_QuantityHandedOver: 'Handedover Qty',
- Pi_distribution: 'distribution',
+ Pi_distribution: 'Distribution',
Cumulative: 'Cumulative',
//汇总交接
@@ -203,9 +205,9 @@ export default {
Scrap: 'FG scrap',
CollectionAndBorrowing: 'FG cost center',
Inventory: 'FG PSV',
- raw_Inventory: 'raw Inventory',
+ raw_Inventory: 'Raw Inventory',
Transfer: 'Library Code',
- generate: 'generate',
+ generate: 'Generate',
RowWarehouse: 'RAW WH',
SemiProductZC: 'SFG transfer',
@@ -233,25 +235,25 @@ export default {
// 委外-入库
CommissionEntrant: 'Subcontracting receipt',
- CommissionedSingleNumber: 'single',
- CommissionedMaterielNo: 'code',
- CommissionedMaterielDesc: 'describe',
+ CommissionedSingleNumber: 'Order No',
+ CommissionedMaterielNo: 'Code',
+ CommissionedMaterielDesc: 'Describe',
SourceLocation: 'Source location',
barcode: 'Please enter barcode',
Requisition: 'Requisition',
scrapForm: 'Please scan the scrap form first',
finishedProduct: 'Please select finished product code first',
CommissionedDemandData: 'Demand',
- CommissionedCumulativeData: 'total',
+ CommissionedCumulativeData: 'Total',
CommissionedLocation: 'Loc',
- CommissionedThisNumber: 'quantity',
+ CommissionedThisNumber: 'Quantity',
CommissionedNumber: 'Receipt quantity',
CommissionedEntrantDetails: 'Warehousing',
greater: 'Cannot be greater than total',
LibraryCode: 'Please change the library code',
CommissionedReceiptQuantity: 'Receipt quantity',
TargetLocation: 'Please select a different target location',
- subcontract: 'subcontract',
+ subcontract: 'Subcontract',
// 委外-出库
CommissionGoOut: 'Subcontracting issue',
@@ -271,11 +273,11 @@ export default {
endtime: 'Please select an end time',
end: 'End time',
starttime: 'Please select an start time',
- start: 'start time',
+ start: 'Start time',
_tips5: 'Please select the same location',
_tips6: 'Please enter the order number to query first',
Out: 'Out',
- enter: 'enter',
+ enter: 'Enter',
//移库
Warehouse_QueryCriteria: 'Query criteria',
Warehouse_TransferOrderNo: 'Transfer order No',
@@ -286,7 +288,7 @@ export default {
Warehouse_OrderNo: 'Order No',
LocationScanned: 'Location scanned',
Warehouse_OriginalLocation: 'Original Loc',
- code: 'code',
+ code: 'Inventory number',
Warehouse_TargetLocation: 'Target Loc',
Warehouse_Tip: 'Please input the transfer order No',
transfer_barcode: 'Library transfer barcode',
@@ -297,14 +299,14 @@ export default {
Scrap_ScrapNo: 'Scrap',
Scrap_Tip: 'Please input scrap No',
Scrap_ScrapDetails: 'Scrap detail',
- operatingTime: 'operatingTime',
+ operatingTime: 'OperatingTime',
finishedProductReport: 'Scrap details',
//领用借用
borrow_OrderNo: 'Order No',
borrow_Tip: 'Please input order No',
borrow_CollectionAndBorrowingDetails: 'Cost center detail',
- usingDetail: 'borrowing details',
+ usingDetail: 'Borrowing details',
//成品主菜单
// EnterTheWarehouse: 'Enter The Warehouse',
@@ -325,10 +327,10 @@ export default {
DumpListSH: 'SFG receive',
DumpListSHMX: 'SFG receive detail',
deliver: 'DN deliver goods',
- Line: 'rowItem',
- screen: 'screen',
+ Line: 'RowItem',
+ screen: 'Screen',
time: 'Please select the time first',
- po_Deliver: 'deliver',
+ po_Deliver: 'Deliver',
//成品入库主菜单
product_item1: 'FG inward',
product_item2: 'Transfer vehicle offline',
@@ -347,12 +349,12 @@ export default {
product_TransferCar: 'Transfer vehicle',
product_MaterialCode: 'MAT code',
product_FGCode: 'FG code',
- product_add: 'add',
+ product_add: 'Add',
product_FGDes: 'FG desc',
product_MaterialDes: 'MAT desc',
product_Number: 'Qty',
repeatedly: 'Do not add repeatedly',
- delete: 'delete',
+ delete: 'Delete',
product_costCenter: 'Cost center',
product_Unit: 'Unit',
product_Cancel: 'Cancel',
@@ -368,12 +370,12 @@ export default {
product_Tip8: 'Success!',
product_Tip9: 'The barcode is not in the warehouse',
//半成品冰箱下线
- product_unit1: 'pcs',
- product_unit2: 'pair',
- product_unit3: 'yard',
- product_unit4: 'set',
- product_unit5: 'ctn',
- product_unit6: 'other',
+ product_unit1: 'PCS',
+ product_unit2: 'Pair',
+ product_unit3: 'Yard',
+ product_unit4: 'Set',
+ product_unit5: 'CTN',
+ product_unit6: 'Other',
product_unit7: 'Please input material barcode',
//成品空调/洗衣机下线
//半成品门体上线
diff --git a/src/main.ts b/src/main.ts
index c6400aa..df47f03 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,3 +1,12 @@
+/*
+ * @Author: zhou lei
+ * @Date: 2021-11-08 12:10:26
+ * @LastEditTime: 2022-01-21 13:37:04
+ * @LastEditors: zhou lei
+ * @Description:
+ * @FilePath: /wms_haiwai_app/src/main.ts
+ * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
+ */
import Vue from 'vue';
import uView from 'uview-ui';
import i18n from '@/i18n';
@@ -8,6 +17,7 @@ import { Alerts } from '@/components/alert/alert';
import filters from '@/utils/filter';
import plugins from '@/plugins';
import wybTable from '@/plugins/wyb-table/wyb-table.vue';
+import MyMixins from './utils/mixin';
Vue.config.productionTip = false;
@@ -19,6 +29,7 @@ Vue.use(Alerts);
Vue.use(filters);
// 引入插件组件
Vue.use(plugins);
+Vue.mixin(MyMixins);
Vue.component('wyb-table', wybTable);
export default new App({
diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue
index a7f0d9e..968e305 100644
--- a/src/pages/login/login/index.vue
+++ b/src/pages/login/login/index.vue
@@ -24,7 +24,7 @@
}"
>
+
-import { Component, Ref } from 'vue-property-decorator';
+import { Component, Ref, Watch } from 'vue-property-decorator';
import { server } from '@/pages/login/server/model';
import Alerts from '@/components/alert/alerts.vue';
import { page } from '@/utils/page';
@@ -85,7 +86,7 @@ import { session } from '@/store/modules/session';
import { BasePage } from '@/components/base/page';
import { VForm } from 'vue/types/form';
import { Lang } from '@/i18n';
-import { url } from '@/utils/url';
+// mixin 引入示例目前用于弹窗自定义
// import { any } from 'lodash/fp';
@Component({
@@ -107,6 +108,14 @@ export default class LoginPage extends BasePage {
return server.serverAddress;
}
+ // 小数点保留
+ username = '';
+ @Watch('username')
+ typeNum() {
+ this.$nextTick(() => {
+ this.username = this.username.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');
+ });
+ }
form = {
username: '',
password: '',
@@ -143,10 +152,8 @@ export default class LoginPage extends BasePage {
async update() {
await session.QueryVersion();
if (this.Version != session.Version) {
- //alert('版本更新啦!');
// 版本更新提示
uni.showModal({
- //title: this.$t('message.updatePrompt') as string,
content: this.$t('message.Tip1') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
@@ -154,38 +161,103 @@ export default class LoginPage extends BasePage {
if (res.confirm) {
//确定执行下载
let downloadApkUrl = session.url;
- // uni.downloadFile({
- // url: downloadApkUrl,
- // });
- var dtask = plus.downloader.createDownload(downloadApkUrl, {}, function (d, status) {
- if (status == 200) {
- console.log('Download success: ' + d.filename);
- uni.showToast({
- icon: 'none',
- title: d.filename,
- });
- } else {
- console.log('Download failed: ' + status);
- }
+ ////////////////uni下载方法,
+ uni.downloadFile({
+ url: downloadApkUrl,
+ success: (downloadResult) => {
+ //uni.hideLoading();
+ if (downloadResult.statusCode == 200) {
+ //安装更新
+ plus.runtime.install(downloadResult.tempFilePath as any, { force: true }, function () {
+ //uni.showToast('更新成功,重启');
+ plus.runtime.restart();
+ });
+ // uni.showModal({
+ // //content: '更新更新',
+ // content: this.$t('message.Tip2') as string,
+ // confirmText: this.$t('message.restart') as string,
+ // cancelText: this.$t('message.Cancel') as string,
+ // success: function (res) {
+ // if (res.confirm == true) {
+ // plus.runtime.install(downloadResult.tempFilePath, { force: true }, function (res) {
+ // //uni.showToast('更新成功,重启');
+ // plus.runtime.restart();
+ // });
+ // }
+ // },
+ // });
+ }
+ },
});
- dtask.start();
+ ///////////////////// plus方法
+ // plus.downloader
+ // .createDownload(downloadApkUrl, {}, function (d, status) {
+ // uni.showModal({
+ // content: status,
+ // });
+ // if (status == 200) {
+ // uni.showModal({
+ // title: '',
+ // content: this.$t('message.Tip2') as string,
+ // confirmText: this.$t('message.restart') as string,
+ // cancelText: this.$t('message.Cancel') as string,
+ // success: function (res) {
+ // if (res.confirm == true) {
+ // plus.runtime.install(plus.io.convertLocalFileSystemURL(d.filename), { force: true }, function (res) {
+ // //uni.showToast('更新成功,重启');
+ // plus.runtime.restart();
+ // });
+ // }
+ // },
+ // });
+ // } else {
+ // console.log('Download failed: ' + status);
+ // }
+ // })
+ // .start();
+ // dtask.start();
+ /////////////////plus 方法
} else if (res.cancel) {
//console.log('用户点击取消');
}
},
});
-
- //dtask.addEventListener("statechanged", onStateChanged, false);
- // await uni.downloadFile({
- // url: session.url,
- // success: (res) => {
- // console.log('res.statusCode', res.statusCode);
- // console.log('res.tempFilePath', res.tempFilePath);
- // console.log("url,url,url",session.url);
- // },
- // });
}
}
+ /////////////////无用代码无用代码
+ // 更新应用资源
+ async installApk(path) {
+ plus.runtime.install(
+ path,
+ {},
+ function () {
+ console.log('安装文件成功!');
+ plus.runtime.restart();
+ },
+ function (e) {
+ uni.hideLoading();
+ console.log(JSON.stringify(e)); //这里!e一直为null,path路径为_downloads/apk/10.apk
+ uni.showToast({
+ title: '安装失败',
+ mask: false,
+ duration: 1500,
+ });
+ },
+ );
+ }
+ /* 安装失败 */
+ failed() {
+ uni.showToast({
+ icon: 'none',
+ mask: true,
+ title: '更新失败!请退出重试或向工作人员反映',
+ duration: 1500,
+ });
+ setTimeout(function () {
+ plus.runtime.quit();
+ }, 1500);
+ }
+ ////////////////////////////
login(): void {
this.$form.validate(async (valid: boolean) => {
if (valid) {
diff --git a/src/pages/product/inbound/finishProductOffline/index.vue b/src/pages/product/inbound/finishProductOffline/index.vue
index 13b2775..643062e 100644
--- a/src/pages/product/inbound/finishProductOffline/index.vue
+++ b/src/pages/product/inbound/finishProductOffline/index.vue
@@ -10,7 +10,7 @@
-
+
@@ -24,8 +24,8 @@
-
-
+
+
@@ -206,10 +206,7 @@ export default class finishProductOfflineDom extends BasePage {
*/
onOk() {
if (this.selectMaterielList.length == 0) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip2') as string,
- });
+ this.customToast(this.$t('message.product_Tip2') as string);
} else {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
@@ -246,10 +243,7 @@ export default class finishProductOfflineDom extends BasePage {
}
getBarcode() {
if (this.form.aimWl.value == undefined) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip3') as string,
- });
+ this.customToast(this.$t('message.product_Tip3') as string);
return;
}
console.log('this.form', this.form);
@@ -274,10 +268,7 @@ export default class finishProductOfflineDom extends BasePage {
this.$table.onCheckAllTap();
});
} else {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip7') as string,
- });
+ this.customToast(this.$t('message.product_Tip7') as string);
}
}
const item = {
diff --git a/src/pages/product/outbound/stoOutbound/Back.vue b/src/pages/product/outbound/stoOutbound/Back.vue
index a99bde7..a6663fd 100644
--- a/src/pages/product/outbound/stoOutbound/Back.vue
+++ b/src/pages/product/outbound/stoOutbound/Back.vue
@@ -66,10 +66,7 @@ export default class stoOutboundDom extends BasePage {
}
async BackSweep() {
if (!this.barCode) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.barcode') as string,
- });
+ this.customToast(this.$t('message.barcode') as string);
return;
}
let params = {
@@ -82,7 +79,7 @@ export default class stoOutboundDom extends BasePage {
await this.model.BackSweep(params);
if (this.model.code == '1') {
uni.showToast({
- icon: 'none',
+ icon: 'success',
title: this.$t('message.succeeded') as string,
});
this.barCode = '';
diff --git a/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue b/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue
index f5593ee..266acd8 100644
--- a/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue
+++ b/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue
@@ -14,7 +14,7 @@
-
+
@@ -38,7 +38,7 @@
-
+
@@ -164,10 +164,7 @@ export default class stoOutboundDom extends BasePage {
//查询单号详细页面
async detailed() {
if (!this.form.orderNo) {
- 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.queryDetailed(this.form.orderNo);
@@ -175,10 +172,7 @@ export default class stoOutboundDom extends BasePage {
}
BackSweep() {
if (!this.form.orderNo) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips1') as any,
- });
+ this.customToast(this.$t('message.Commission_tips1') as any);
return;
}
sessionStorage.setItem('SweepCode', JSON.stringify(this.form.orderNo));
@@ -186,16 +180,13 @@ export default class stoOutboundDom extends BasePage {
}
async query() {
if (!this.form.orderNo) {
- 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.findProdInfoByDN(this.form.orderNo);
if (model.DNcode == '1') {
uni.showToast({
- icon: 'none',
+ icon: 'success',
title: this.$t('message.successful') as any,
});
this.form.productCode = this.model.materielList[0].materialCode;
@@ -339,10 +330,7 @@ export default class stoOutboundDom extends BasePage {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip6') as string,
- });
+ this.customToast(this.$t('message.product_Tip6') as string);
return;
}
//let selctlist: any = [];
@@ -407,6 +395,10 @@ export default class stoOutboundDom extends BasePage {
diff --git a/src/pages/product/outbound/stoOutbound/index.vue b/src/pages/product/outbound/stoOutbound/index.vue
index dac1ef5..a446dfe 100644
--- a/src/pages/product/outbound/stoOutbound/index.vue
+++ b/src/pages/product/outbound/stoOutbound/index.vue
@@ -255,11 +255,11 @@ export default class stoOutboundDom extends BasePage {
onSubmit() {
this.$form.validate(async (valid: boolean) => {
if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) {
- uni.showToast({ icon: 'none', title: this.$t('message.product_Tip5') as string });
+ this.customToast(this.$t('message.product_Tip5') as string);
return;
}
if (parseInt(this.form.orderAmount) <= parseInt(this.form.scanAmount)) {
- uni.showToast({ icon: 'none', title: this.$t('message.product_Tip6') as string });
+ this.customToast(this.$t('message.product_Tip6') as string);
return;
}
let list = [
@@ -302,7 +302,7 @@ export default class stoOutboundDom extends BasePage {
this.form.scanAmount += 1;
this.$table.onCheckAllTap();
} else {
- uni.showToast({ icon: 'none', title: this.$t('message.product_Tip7') as string });
+ this.customToast(this.$t('message.product_Tip7') as string);
}
}
}
diff --git a/src/pages/product/warehouse/LocationInventory/index.vue b/src/pages/product/warehouse/LocationInventory/index.vue
index 2dd349e..9b4bfd4 100644
--- a/src/pages/product/warehouse/LocationInventory/index.vue
+++ b/src/pages/product/warehouse/LocationInventory/index.vue
@@ -87,10 +87,7 @@ export default class ProductCheckReceipt extends BasePage {
//单号查询
async query() {
if (!this.form.pddNo) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips1') as string,
- });
+ this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
let param = {
@@ -100,10 +97,7 @@ export default class ProductCheckReceipt extends BasePage {
};
await this.model.queryScrapList(param);
if (this.model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip8') as string,
- });
+ this.customToast(this.$t('message.product_Tip8') as string);
let num = 0;
this.model.modelList.forEach((item: any) => {
num += item.spQty;
@@ -129,16 +123,10 @@ export default class ProductCheckReceipt extends BasePage {
//条码扫码
async scanning() {
if (!this.form.pddNo) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips1') as string,
- });
+ this.customToast(this.$t('message.Commission_tips1') as string);
}
if (!this.form.barcode) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.barcode') as string,
- });
+ this.customToast(this.$t('message.barcode') as string);
}
let params = {
factoryCode: session.factoryCode,
@@ -155,10 +143,7 @@ export default class ProductCheckReceipt extends BasePage {
};
await this.model.getProductCode(params);
if (this.model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip8') as string,
- });
+ this.customToast(this.$t('message.product_Tip8') as string);
this.total += 1;
this.model.modelList.forEach((item: any) => {
if (item.locCode == this.wl.value) {
@@ -172,24 +157,15 @@ export default class ProductCheckReceipt extends BasePage {
//确定
async onSubmit() {
if (this.form.pddNo == '') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip5') as string,
- });
+ this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
if (this.total == '') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip5') as string,
- });
+ this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
if (!this.Some) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip3') as string,
- });
+ this.customToast(this.$t('message.product_Tip3') as string);
return;
}
const params = {
@@ -205,7 +181,7 @@ export default class ProductCheckReceipt extends BasePage {
await this.model.onTakeoutConfirm(params);
if (this.model.status == 'S') {
uni.showToast({
- icon: 'none',
+ icon: 'success',
title: this.$t('message.success') as string,
});
this.form.pddNo = '';
diff --git a/src/pages/product/warehouse/MaterialInventory/index.vue b/src/pages/product/warehouse/MaterialInventory/index.vue
index c96b9e3..5a3fbfc 100644
--- a/src/pages/product/warehouse/MaterialInventory/index.vue
+++ b/src/pages/product/warehouse/MaterialInventory/index.vue
@@ -95,10 +95,7 @@ export default class ProductCheckReceipt extends BasePage {
//单号查询
async query() {
if (!this.form.pddNo) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips1') as string,
- });
+ this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
let param = {
@@ -108,11 +105,8 @@ export default class ProductCheckReceipt extends BasePage {
};
await this.model.queryScrapList(param);
if (this.model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip8') as string,
- });
- let num: number = 0;
+ this.customToast(this.$t('message.product_Tip8') as string);
+ let num = 0;
this.model.modelList.forEach((item: any) => {
num += parseFloat(item.spQty);
let arr: any = {};
@@ -138,16 +132,10 @@ export default class ProductCheckReceipt extends BasePage {
//条码扫码
async scanning() {
if (!this.form.pddNo) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.scrapForm') as string,
- });
+ this.customToast(this.$t('message.scrapForm') as string);
}
if (!this.form.barcode) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.barcode') as string,
- });
+ this.customToast(this.$t('message.barcode') as string);
}
let params = {
factoryCode: session.factoryCode,
@@ -164,10 +152,7 @@ export default class ProductCheckReceipt extends BasePage {
};
await this.model.getProductCode(params);
if (this.model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip8') as string,
- });
+ this.customToast(this.$t('message.product_Tip8') as string);
this.total += 1;
this.model.modelList.forEach((item: any) => {
if (item.productCode == this.wl.value) {
@@ -181,24 +166,15 @@ export default class ProductCheckReceipt extends BasePage {
//确定
async onSubmit() {
if (this.form.pddNo == '') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip5') as string,
- });
+ this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
if (this.total == '') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip5') as string,
- });
+ this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
if (!this.Some) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.selectCode') as string,
- });
+ this.customToast(this.$t('message.selectCode') as string);
return;
}
const params = {
@@ -214,7 +190,7 @@ export default class ProductCheckReceipt extends BasePage {
await this.model.onTakeoutConfirm(params);
if (this.model.status == 'S') {
uni.showToast({
- icon: 'none',
+ icon: 'success',
title: this.$t('message.success') as string,
});
this.form.pddNo = '';
diff --git a/src/pages/product/warehouse/wholeCollect/index.vue b/src/pages/product/warehouse/wholeCollect/index.vue
index 1957bfd..8d998d8 100644
--- a/src/pages/product/warehouse/wholeCollect/index.vue
+++ b/src/pages/product/warehouse/wholeCollect/index.vue
@@ -36,7 +36,7 @@
-
+
@@ -99,10 +99,7 @@ export default class ProductCheckReceipt extends BasePage {
//单号查询
async query() {
if (!this.form.order3) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips1') as string,
- });
+ this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
let param = {
@@ -115,10 +112,7 @@ export default class ProductCheckReceipt extends BasePage {
};
await this.model.queryScrapList(param);
if (this.model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip8') as string,
- });
+ this.customToast(this.$t('message.product_Tip8') as string);
this.wl.value = this.model.choiceCodeList[0].value;
this.Some = this.model.recordsList[0];
}
@@ -135,22 +129,13 @@ export default class ProductCheckReceipt extends BasePage {
//条码扫码
async scanning() {
if (!this.form.order3) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.scrapForm') as string,
- });
+ this.customToast(this.$t('message.scrapForm') as string);
}
if (!this.Some) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.finishedProduct') as string,
- });
+ this.customToast(this.$t('message.finishedProduct') as string);
}
if (!this.form.barcode) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.barcode') as string,
- });
+ this.customToast(this.$t('message.barcode') as string);
return;
}
let params = {
@@ -162,10 +147,7 @@ export default class ProductCheckReceipt extends BasePage {
};
await this.model.getProductCode(params);
if (this.model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip8') as string,
- });
+ this.customToast(this.$t('message.product_Tip8') as string);
this.Some.actualQty += 1;
}
}
@@ -188,7 +170,7 @@ export default class ProductCheckReceipt extends BasePage {
await this.model.onTakeoutConfirm(orderlist);
if (this.model.code == '1') {
uni.showToast({
- icon: 'none',
+ icon: 'success',
title: this.$t('message.success') as string,
});
}
@@ -200,10 +182,7 @@ export default class ProductCheckReceipt extends BasePage {
//查询明细
async bill() {
if (!this.form.order3) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips1') as string,
- });
+ this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
await this.model.queryDetailed(this.form.order3);
diff --git a/src/pages/product/warehouse/wholeLnventory/index.vue b/src/pages/product/warehouse/wholeLnventory/index.vue
index fd8c3b3..8915bdf 100644
--- a/src/pages/product/warehouse/wholeLnventory/index.vue
+++ b/src/pages/product/warehouse/wholeLnventory/index.vue
@@ -31,17 +31,17 @@
-
+
-
+
-
+
@@ -121,17 +121,11 @@ export default class productCheckReceipt extends BasePage {
}
async query() {
if (this.form.pddNo == '') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips1') as string,
- });
+ this.customToast(this.$t('message.Commission_tips1') as string);
}
await this.model.getProductCode(this.form.pddNo);
if (model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip8') as string,
- });
+ this.customToast(this.$t('message.product_Tip8') as string);
// 获取选择库位的集合
const storeList = [];
storeList.push(this.model.WlListaa[0]);
@@ -177,10 +171,7 @@ export default class productCheckReceipt extends BasePage {
// 成功查询后,已扫+1
async scanCode(e: any) {
if (!this.form.pddNo) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip5') as string, //请扫描单号
- });
+ this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
const list = {
@@ -207,17 +198,11 @@ export default class productCheckReceipt extends BasePage {
this.$form.validate((valid: boolean) => {
if (!valid) return;
if (!this.form.pddNo) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip5') as string, //请扫描单号
- });
+ this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
if (!this.form.originWl.productCode) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip6') as string, //请选择物料
- });
+ this.customToast(this.$t('message.Warehouse_Tip6') as string);
return;
}
if (this.form.originWl.ypQty == this.form.originWl.spQty) {
diff --git a/src/pages/product/warehouse/wholeScrap/index.vue b/src/pages/product/warehouse/wholeScrap/index.vue
index af3b1e2..cd900ab 100644
--- a/src/pages/product/warehouse/wholeScrap/index.vue
+++ b/src/pages/product/warehouse/wholeScrap/index.vue
@@ -2,7 +2,7 @@
@@ -79,10 +79,10 @@ import { VForm, VFormRules } from 'vue/types/form';
import model from './model';
import { session } from '@/store/modules/session';
-interface OptionType {
- label: string;
- value: string;
-}
+// interface OptionType {
+// label: string;
+// value: string;
+// }
@Component({
components: {
@@ -111,22 +111,13 @@ export default class productCheckReceipt extends BasePage {
//条码扫码
async scanning() {
if (!this.form.order3) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.scrapForm') as string,
- });
+ this.customToast(this.$t('message.scrapForm') as string);
}
if (!this.Some) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.finishedProduct') as string,
- });
+ this.customToast(this.$t('message.finishedProduct') as string);
}
if (!this.form.barcode) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.barcode') as string,
- });
+ this.customToast(this.$t('message.barcode') as string);
return;
}
let params = {
@@ -138,10 +129,7 @@ export default class productCheckReceipt extends BasePage {
};
await this.model.getProductCode(params);
if (this.model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip8') as string,
- });
+ this.customToast(this.$t('message.product_Tip8') as string);
this.Some.actualQty += 1;
}
}
@@ -158,10 +146,7 @@ export default class productCheckReceipt extends BasePage {
//单号查询
async query() {
if (!this.form.order3) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips1') as string,
- });
+ this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
let param = {
@@ -174,10 +159,7 @@ export default class productCheckReceipt extends BasePage {
};
await this.model.queryScrapList(param);
if (this.model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip8') as string,
- });
+ this.customToast(this.$t('message.product_Tip8') as string);
this.model.recordsList.forEach((item: any) => {
item.fileNo = ' ';
});
@@ -188,10 +170,7 @@ export default class productCheckReceipt extends BasePage {
//确定
async onSubmit() {
if (!this.Some.fileNo) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.fileNumber') as string,
- });
+ this.customToast(this.$t('message.fileNumber') as string);
return;
}
const orderlist = [
@@ -212,7 +191,7 @@ export default class productCheckReceipt extends BasePage {
await this.model.onTakeoutConfirm(orderlist);
if (this.model.code == '1') {
uni.showToast({
- icon: 'none',
+ icon: 'success',
title: this.$t('message.success') as string,
});
this.Some = {};
@@ -225,10 +204,7 @@ export default class productCheckReceipt extends BasePage {
//查询明细
async bill() {
if (!this.form.order3) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips1') as string,
- });
+ this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
await this.model.queryDetailed(this.form.order3);
diff --git a/src/pages/product/warehouse/wholeTransfer/Local-details.vue b/src/pages/product/warehouse/wholeTransfer/Local-details.vue
index e45800a..4b0c4b7 100644
--- a/src/pages/product/warehouse/wholeTransfer/Local-details.vue
+++ b/src/pages/product/warehouse/wholeTransfer/Local-details.vue
@@ -37,10 +37,7 @@ export default class RawReceiptDetail extends BasePage {
}
async generate() {
if (this.userDefined4 == '') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message._tips6') as any,
- });
+ this.customToast(this.$t('message._tips6') as any);
return;
}
let content = {
diff --git a/src/pages/product/warehouse/wholeTransfer/index.vue b/src/pages/product/warehouse/wholeTransfer/index.vue
index 6e950e9..0f9a009 100644
--- a/src/pages/product/warehouse/wholeTransfer/index.vue
+++ b/src/pages/product/warehouse/wholeTransfer/index.vue
@@ -101,16 +101,13 @@ export default class productCheckReceipt extends BasePage {
//扫描条码回车
async query() {
if (this.form.productCode == ' ' || this.form.productCode.length == 0) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_unit7') as string,
- });
+ this.customToast(this.$t('message.product_unit7') as string);
return;
}
await model.getProductCode(this.form.productCode);
if (model.code == '1') {
uni.showToast({
- icon: 'none',
+ icon: 'success',
title: this.$t('message.successful') as string,
});
}
@@ -141,31 +138,19 @@ export default class productCheckReceipt extends BasePage {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
if (this.userDefined4 == ' ' || this.userDefined4.length == 0) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.LibraryCode') as string,
- });
+ this.customToast(this.$t('message.LibraryCode') as string);
return;
}
if (!this.form.productCode) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip5') as string,
- });
+ this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
if (!this.form.aimWl.value) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip3') as string,
- });
+ this.customToast(this.$t('message.Warehouse_Tip3') as string);
return;
}
if (this.form.aimWl.value == model.orderInInfo.locCode) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.TargetLocation') as string,
- });
+ this.customToast(this.$t('message.TargetLocation') as string);
return;
}
const orderlist = [
@@ -183,10 +168,7 @@ export default class productCheckReceipt extends BasePage {
];
await this.model.onTakeoutConfirm(orderlist);
if (model.code == '1') {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Warehouse_Tip9') as string,
- });
+ this.customToast(this.$t('message.Warehouse_Tip9') as string);
this.form.productCode = '';
model.empty();
setTimeout(() => {
diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue
index ed4ec6c..b4fdf26 100644
--- a/src/pages/raw/commission/entrant/index.vue
+++ b/src/pages/raw/commission/entrant/index.vue
@@ -47,11 +47,11 @@
{{ $t('message.CommissionedLocation') }}
-
+
{{ $t('message.CommissionedThisNumber') }}
-
+
diff --git a/src/pages/raw/handover/aggregating/index.vue b/src/pages/raw/handover/aggregating/index.vue
index 72076f1..4bd735a 100644
--- a/src/pages/raw/handover/aggregating/index.vue
+++ b/src/pages/raw/handover/aggregating/index.vue
@@ -237,8 +237,7 @@ export default class Aggregating extends BasePage {
async onReady() {
this.$form.setRules(this.rules);
model.clearProOrderList();
- //guoshuang 注掉 解决打开页面默认显示工厂号
- // this.form.sapFactoryCode = session.factoryCode;
+ this.form.sapFactoryCode = session.factoryCode;
}
/**
* 确认
diff --git a/src/pages/raw/handover/picking/ByOrder.vue b/src/pages/raw/handover/picking/ByOrder.vue
index 4ea5057..b15b119 100644
--- a/src/pages/raw/handover/picking/ByOrder.vue
+++ b/src/pages/raw/handover/picking/ByOrder.vue
@@ -29,7 +29,7 @@
{{ $t('message.CommissionedThisNumber') }}:
-
+
diff --git a/src/pages/raw/handover/picking/BySummary.vue b/src/pages/raw/handover/picking/BySummary.vue
index ae3413b..d4ff2c6 100644
--- a/src/pages/raw/handover/picking/BySummary.vue
+++ b/src/pages/raw/handover/picking/BySummary.vue
@@ -30,7 +30,7 @@
{{ $t('message.CommissionedThisNumber') }}:
-
+
diff --git a/src/pages/raw/handover/picking/index.vue b/src/pages/raw/handover/picking/index.vue
index 96c9172..d31ac5d 100644
--- a/src/pages/raw/handover/picking/index.vue
+++ b/src/pages/raw/handover/picking/index.vue
@@ -156,8 +156,7 @@ export default class pickingDom extends BasePage {
onReady() {
this.$form.setRules(this.rules);
model.clearProOrderList();
- // guoshuang 注掉,解决打开页面有默认工厂号
- // this.form.sapFactoryCode = session.factoryCode;
+ this.form.sapFactoryCode = session.factoryCode;
}
/**
diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue
index 6ed8af0..f151a64 100644
--- a/src/pages/raw/handover/returning/index.vue
+++ b/src/pages/raw/handover/returning/index.vue
@@ -47,14 +47,14 @@
-
+
-
-
-
+
+
+
diff --git a/src/pages/raw/handover/virtual/index.vue b/src/pages/raw/handover/virtual/index.vue
index f8a190a..433674a 100644
--- a/src/pages/raw/handover/virtual/index.vue
+++ b/src/pages/raw/handover/virtual/index.vue
@@ -269,8 +269,7 @@ export default class Virtual extends BasePage {
async onReady() {
this.$form.setRules(this.rules);
model.clearProOrderList();
- //guoshuang 注掉 解决打开页面默认显示工厂号
- //this.form.sapFactoryCode = session.factoryCode;
+ this.form.sapFactoryCode = session.factoryCode;
}
/**
diff --git a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue
index 5881b89..d995803 100644
--- a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue
+++ b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue
@@ -48,8 +48,7 @@
{{ $t('message.Cumulative') }}
-
-
+
@@ -60,7 +59,7 @@
{{ $t('message.CommissionedThisNumber') }}
-
+
@@ -553,39 +552,39 @@ export default class dnReceiptDom extends BasePage {
}
}
}
- .library {
- width: 100%;
- height: 100rpx;
- display: flex;
- .library-left {
- width: 50%;
- height: 100%;
- display: flex;
- view {
- width: 100rpx;
- line-height: 100rpx;
- }
- .search {
- padding-left: 20px;
- }
- }
- .library-right {
- width: 50%;
- height: 100%;
- display: flex;
- .library-right-title {
- width: 120rpx;
- height: 100%;
- padding-left: 4px;
- line-height: 100rpx;
- }
- .input {
- width: 200rpx;
- height: 70rpx;
- margin-top: 15rpx;
- }
- }
- }
+ // .library {
+ // width: 100%;
+ // height: 100rpx;
+ // display: flex;
+ // .library-left {
+ // width: 50%;
+ // height: 100%;
+ // display: flex;
+ // view {
+ // width: 100rpx;
+ // line-height: 100rpx;
+ // }
+ // .search {
+ // padding-left: 30px;
+ // }
+ // }
+ // .library-right {
+ // width: 50%;
+ // height: 100%;
+ // display: flex;
+ // .library-right-title {
+ // width: 120rpx;
+ // height: 100%;
+ // line-height: 100rpx;
+ // }
+ // .input {
+ // width: 200rpx;
+ // height: 70rpx;
+ // margin-top: 15rpx;
+ // margin-left: 15rpx;
+ // }
+ // }
+ // }
.add {
width: 100%;
height: 100rpx;
diff --git a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue
index 917965e..7be13e8 100644
--- a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue
+++ b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue
@@ -44,12 +44,11 @@
{{ $t('message.DemandQuantity') }}
-
+
{{ $t('message.Cumulative') }}
-
-
+
@@ -60,7 +59,7 @@
{{ $t('message.CommissionedThisNumber') }}
-
+
@@ -130,6 +129,15 @@ export default class dnReceiptDom extends BasePage {
poNo: any = null;
// 需求数量
requestAmount: number = null;
+ //receiptAmount = (this.receiptAmount.match(/\d+(.\d{0,2})?/) || [''])[0];
+ async onReady() {
+ // this.model.DNReceivingList = [];
+ this.resetForm();
+ //this.initLocation();
+ }
+ input() {
+ this.receiptAmount = (this.receiptAmount.match(/\d+(.\d{0,2})?/) || [''])[0];
+ }
// 页面初始化
// 页面需要清空仓库,因此需要复用该方法
async initLocation(condition): Promise {
@@ -553,39 +561,39 @@ export default class dnReceiptDom extends BasePage {
}
}
}
- .library {
- width: 100%;
- height: 100rpx;
- display: flex;
- .library-left {
- width: 50%;
- height: 100%;
- display: flex;
- view {
- width: 100rpx;
- line-height: 100rpx;
- }
- .search {
- padding-left: 20px;
- }
- }
- .library-right {
- width: 50%;
- height: 100%;
- display: flex;
- .library-right-title {
- width: 120rpx;
- height: 100%;
- padding-left: 4px;
- line-height: 100rpx;
- }
- .input {
- width: 200rpx;
- height: 70rpx;
- margin-top: 15rpx;
- }
- }
- }
+ // .library {
+ // width: 100%;
+ // height: 100rpx;
+ // display: flex;
+ // .library-left {
+ // width: 50%;
+ // height: 100%;
+ // display: flex;
+ // view {
+ // width: 100rpx;
+ // line-height: 100rpx;
+ // }
+ // .search {
+ // padding-left: 30px;
+ // }
+ // }
+ // .library-right {
+ // width: 50%;
+ // height: 100%;
+ // display: flex;
+ // .library-right-title {
+ // width: 120rpx;
+ // height: 100%;
+ // line-height: 100rpx;
+ // }
+ // .input {
+ // width: 200rpx;
+ // height: 70rpx;
+ // margin-top: 15rpx;
+ // margin-left: 15rpx;
+ // }
+ // }
+ // }
.add {
width: 100%;
height: 100rpx;
diff --git a/src/pages/raw/warehouse/rowCollect/index.vue b/src/pages/raw/warehouse/rowCollect/index.vue
index 270f797..1f12565 100644
--- a/src/pages/raw/warehouse/rowCollect/index.vue
+++ b/src/pages/raw/warehouse/rowCollect/index.vue
@@ -28,7 +28,7 @@
-
+
diff --git a/src/pages/raw/warehouse/rowInventory/index.vue b/src/pages/raw/warehouse/rowInventory/index.vue
index c563e67..2821d63 100644
--- a/src/pages/raw/warehouse/rowInventory/index.vue
+++ b/src/pages/raw/warehouse/rowInventory/index.vue
@@ -47,6 +47,7 @@
diff --git a/src/pages/raw/warehouse/rowScrap/index.vue b/src/pages/raw/warehouse/rowScrap/index.vue
index f7b5d41..eee8e86 100644
--- a/src/pages/raw/warehouse/rowScrap/index.vue
+++ b/src/pages/raw/warehouse/rowScrap/index.vue
@@ -28,7 +28,7 @@
-
+
diff --git a/src/pages/raw/warehouse/rowTransfer/index.vue b/src/pages/raw/warehouse/rowTransfer/index.vue
index 46bedf4..88a94af 100644
--- a/src/pages/raw/warehouse/rowTransfer/index.vue
+++ b/src/pages/raw/warehouse/rowTransfer/index.vue
@@ -35,7 +35,7 @@
-
+
diff --git a/src/sfc.d.ts b/src/sfc.d.ts
index 96dc5d8..9b2d95c 100644
--- a/src/sfc.d.ts
+++ b/src/sfc.d.ts
@@ -1,3 +1,13 @@
+/*
+ * @Author: zhou lei
+ * @Date: 2021-11-08 12:10:26
+ * @LastEditTime: 2022-01-21 09:24:11
+ * @LastEditors: zhou lei
+ * @Description:
+ * @FilePath: /wms_haiwai_app/src/sfc.d.ts
+ * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
+ */
+// 1. 确保在声明补充的类型之前导入 'vue'
declare module '*.vue' {
import Vue from 'vue';
export default Vue;
diff --git a/src/utils/mixin.ts b/src/utils/mixin.ts
new file mode 100644
index 0000000..d04d3a7
--- /dev/null
+++ b/src/utils/mixin.ts
@@ -0,0 +1,29 @@
+/*
+ * @Author: zhou lei
+ * @Date: 2022-01-20 11:26:20
+ * @LastEditTime: 2022-01-20 17:48:10
+ * @LastEditors: zhou lei
+ * @Description:
+ * @FilePath: /wms_haiwai_app/src/utils/mixin.ts
+ * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
+ */
+import Vue from 'vue';
+import { Component } from 'vue-property-decorator';
+
+@Component // 一定要用Component修饰
+export default class MyMixins extends Vue {
+ customToast(msg: string, type = 'MODEL', title = '') {
+ if (type === 'toast') {
+ uni.showToast({
+ title: msg,
+ });
+ } else {
+ uni.showModal({
+ title: title,
+ content: msg,
+ confirmText: this.$t('message.workArea_Confirm') as string,
+ cancelText: this.$t('message.Cancel') as string,
+ });
+ }
+ }
+}
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 0762f42..41a7d3c 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -113,18 +113,41 @@ http.interceptors.response.use(
} else if (error) {
switch (error.statusCode) {
/* eslint-disable */
- case 400: error.message = vm.$t('message.request_Tip1') as string; break
- case 401: error.message = vm.$t('message.request_Tip2') as string; break
- case 403: error.message = vm.$t('message.request_Tip3') as string; break
- case 404: error.message = vm.$t('message.request_Tip4') as string + error.config.url; break
- case 408: error.message = vm.$t('message.request_Tip5') as string; break
- case 500: error.message = vm.$t('message.request_Tip6') as string; break
- case 501: error.message = vm.$t('message.request_Tip7') as string; break
- case 502: error.message = vm.$t('message.request_Tip8') as string; break
- case 503: error.message = vm.$t('message.request_Tip9') as string; break
- case 504: error.message = vm.$t('message.request_Tip10') as string; break
- case 505: error.message = vm.$t('message.request_Tip11') as string; break
- default: break
+ case 400:
+ error.message = vm.$t('message.request_Tip1') as string;
+ break;
+ case 401:
+ error.message = vm.$t('message.request_Tip2') as string;
+ break;
+ case 403:
+ error.message = vm.$t('message.request_Tip3') as string;
+ break;
+ case 404:
+ error.message = (vm.$t('message.request_Tip4') as string) + error.config.url;
+ break;
+ case 408:
+ error.message = vm.$t('message.request_Tip5') as string;
+ break;
+ case 500:
+ error.message = vm.$t('message.request_Tip6') as string;
+ break;
+ case 501:
+ error.message = vm.$t('message.request_Tip7') as string;
+ break;
+ case 502:
+ error.message = vm.$t('message.request_Tip8') as string;
+ break;
+ case 503:
+ error.message = vm.$t('message.request_Tip9') as string;
+ break;
+ case 504:
+ error.message = vm.$t('message.request_Tip10') as string;
+ break;
+ case 505:
+ error.message = vm.$t('message.request_Tip11') as string;
+ break;
+ default:
+ break;
/* eslint-enable */
}
}
@@ -149,9 +172,16 @@ function errorLog(error: Error, hideError: boolean) {
}
// 显示提示
hideError ||
- uni.showToast({
- icon: 'none',
- title: error.message,
+ // uni.showToast({
+ // icon: 'none',
+ // title: error.message,
+ // });
+ uni.showModal({
+ title: '',
+ content: error.message,
+ confirmText: vm.$t('message.workArea_Confirm') as string,
+ cancelText: vm.$t('message.Cancel') as string,
+ showCancel: false,
});
}
diff --git a/tsconfig.json b/tsconfig.json
index 846cd51..d4dc543 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -19,7 +19,8 @@
"webpack-env",
"@dcloudio/types",
"miniprogram-api-typings",
- "mini-types"
+ "mini-types",
+ "@types/html5plus"
],
"paths": {
"@/*": [
diff --git a/types/vue-prototype.d.ts b/types/vue-prototype.d.ts
new file mode 100644
index 0000000..638147a
--- /dev/null
+++ b/types/vue-prototype.d.ts
@@ -0,0 +1,26 @@
+/* eslint-disable @typescript-eslint/no-unused-vars */
+/*
+ * @Author: zhou lei
+ * @Date: 2022-01-21 09:23:56
+ * @LastEditTime: 2022-01-21 11:47:17
+ * @LastEditors: zhou lei
+ * @Description:
+ * @FilePath: /wms_haiwai_app/types/vue-prototype.d.ts
+ * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
+ */
+import Vue from 'vue';
+// 在 types/vue.d.ts 里 Vue 有构造函数类型
+
+declare module 'vue/types/vue' {
+ interface Vue {
+ // $myProperty: string;
+ /**
+ * 自定义弹窗提示
+ * @param {string} msg 消息
+ * @param {string} [type='toast'] 类型
+ * @param {string} [title=''] 标题
+ * @memberof Vue
+ */
+ customToast(msg: string, type?: string = 'toast', title?: string = ''): void;
+ }
+}
diff --git a/yarn.lock b/yarn.lock
index e77c22e..6289b39 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1611,6 +1611,11 @@
dependencies:
"@types/node" "*"
+"@types/html5plus@^1.0.2":
+ version "1.0.2"
+ resolved "https://registry.npmmirror.com/@types/html5plus/download/@types/html5plus-1.0.2.tgz#43e1aaca4584e7e2cf0db082389f42fbba98062c"
+ integrity sha1-Q+GqykWE5+LPDbCCOJ9C+7qYBiw=
+
"@types/http-proxy-middleware@*":
version "0.19.3"
resolved "https://registry.npm.taobao.org/@types/http-proxy-middleware/download/@types/http-proxy-middleware-0.19.3.tgz?cache=0&sync_timestamp=1605053627891&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fhttp-proxy-middleware%2Fdownload%2F%40types%2Fhttp-proxy-middleware-0.19.3.tgz#b2eb96fbc0f9ac7250b5d9c4c53aade049497d03"
@@ -1737,6 +1742,13 @@
dependencies:
source-map "^0.6.1"
+"@types/uni-app@^1.4.4":
+ version "1.4.4"
+ resolved "https://registry.npmmirror.com/@types/uni-app/download/@types/uni-app-1.4.4.tgz#fe73d0e7c89d5e750605e088ff6695846e019c36"
+ integrity sha1-/nPQ58idXnUGBeCI/2aVhG4BnDY=
+ dependencies:
+ vue "^2.6.8"
+
"@types/webpack-dev-server@^3.11.0":
version "3.11.1"
resolved "https://registry.npm.taobao.org/@types/webpack-dev-server/download/@types/webpack-dev-server-3.11.1.tgz?cache=0&sync_timestamp=1605057456418&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fwebpack-dev-server%2Fdownload%2F%40types%2Fwebpack-dev-server-3.11.1.tgz#f8f4dac1da226d530bd15a1d5dc34b23ba766ccb"
@@ -11562,6 +11574,11 @@ vue@^2.6.11:
resolved "https://registry.npm.taobao.org/vue/download/vue-2.6.12.tgz?cache=0&sync_timestamp=1606321041576&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue%2Fdownload%2Fvue-2.6.12.tgz#f5ebd4fa6bd2869403e29a896aed4904456c9123"
integrity sha1-9evU+mvShpQD4pqJau1JBEVskSM=
+vue@^2.6.8:
+ version "2.6.14"
+ resolved "https://registry.npmmirror.com/vue/download/vue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235"
+ integrity sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==
+
vuex-class@^0.3.2:
version "0.3.2"
resolved "https://registry.npm.taobao.org/vuex-class/download/vuex-class-0.3.2.tgz#c7e96a076c1682137d4d23a8dcfdc63f220e17a8"