成品提示信息长存提示框

master
guoshuang 3 years ago
parent a8e3c61057
commit 16379be177

@ -10,7 +10,7 @@
<u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="120rpx">
<u-row align="top">
<u-col :span="12">
<u-form-item :required="true" :label="this.$t('message.product_Location')" prop="dockName">
<u-form-item :required="true" :label="$t('message.product_Location')" prop="dockName">
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="form.aimWl.value" :options="model.returningTypeList" />
<!-- <u-input v-model="form.dockName" type="select" @click="returningTypeSelect = true" />-->
<!-- <u-select-->
@ -24,8 +24,8 @@
<!-- "-->
<!-- ></u-select>-->
</u-form-item>
<u-form-item :label="this.$t('message.product_barCode')">
<u-search :placeholder="this.$t('message.po_PleaseInput')" v-model="form.barCode" @search="getBarcode" :focus="firstFocus" :show-action="false"></u-search>
<u-form-item :label="$t('message.product_barCode')">
<u-search :placeholder="$t('message.po_PleaseInput')" v-model="form.barCode" @search="getBarcode" :focus="firstFocus" :show-action="false"></u-search>
</u-form-item>
</u-col>
<u-col :span="12">
@ -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 = {

@ -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 = '';

@ -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 = [];

@ -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);
}
}
}

@ -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 = '';

@ -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 = '';

@ -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);

@ -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) {

@ -2,7 +2,7 @@
<view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">{{ $t('message.Scrap') }}</view>
<view class="right"></view>
@ -64,7 +64,7 @@
<u-button type="primary" @click="onSubmit">{{ $t('message.InventoryFinish') }}</u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
</u-col>
</u-row>
</view>
@ -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;
}
}
@ -157,10 +145,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 = {
@ -173,10 +158,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 = ' ';
});
@ -187,10 +169,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 = [
@ -211,7 +190,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 = {};
@ -224,10 +203,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);

@ -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 = {

@ -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(() => {

@ -12,7 +12,7 @@ import { Component } from 'vue-property-decorator';
@Component // 一定要用Component修饰
export default class MyMixins extends Vue {
customToast(msg: string, type = 'toast', title = '') {
customToast(msg: string, type = 'MODEL', title = '') {
if (type === 'toast') {
uni.showToast({
title: msg,
@ -21,6 +21,8 @@ export default class MyMixins extends Vue {
uni.showModal({
title: title,
content: msg,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
});
}
}

Loading…
Cancel
Save