成品提示信息长存提示框

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-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="120rpx">
<u-row align="top"> <u-row align="top">
<u-col :span="12"> <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" /> <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-input v-model="form.dockName" type="select" @click="returningTypeSelect = true" />-->
<!-- <u-select--> <!-- <u-select-->
@ -24,8 +24,8 @@
<!-- "--> <!-- "-->
<!-- ></u-select>--> <!-- ></u-select>-->
</u-form-item> </u-form-item>
<u-form-item :label="this.$t('message.product_barCode')"> <u-form-item :label="$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-search :placeholder="$t('message.po_PleaseInput')" v-model="form.barCode" @search="getBarcode" :focus="firstFocus" :show-action="false"></u-search>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="12"> <u-col :span="12">
@ -206,10 +206,7 @@ export default class finishProductOfflineDom extends BasePage {
*/ */
onOk() { onOk() {
if (this.selectMaterielList.length == 0) { if (this.selectMaterielList.length == 0) {
uni.showToast({ this.customToast(this.$t('message.product_Tip2') as string);
icon: 'none',
title: this.$t('message.product_Tip2') as string,
});
} else { } else {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
@ -246,10 +243,7 @@ export default class finishProductOfflineDom extends BasePage {
} }
getBarcode() { getBarcode() {
if (this.form.aimWl.value == undefined) { if (this.form.aimWl.value == undefined) {
uni.showToast({ this.customToast(this.$t('message.product_Tip3') as string);
icon: 'none',
title: this.$t('message.product_Tip3') as string,
});
return; return;
} }
console.log('this.form', this.form); console.log('this.form', this.form);
@ -274,10 +268,7 @@ export default class finishProductOfflineDom extends BasePage {
this.$table.onCheckAllTap(); this.$table.onCheckAllTap();
}); });
} else { } else {
uni.showToast({ this.customToast(this.$t('message.product_Tip7') as string);
icon: 'none',
title: this.$t('message.product_Tip7') as string,
});
} }
} }
const item = { const item = {

@ -66,10 +66,7 @@ export default class stoOutboundDom extends BasePage {
} }
async BackSweep() { async BackSweep() {
if (!this.barCode) { if (!this.barCode) {
uni.showToast({ this.customToast(this.$t('message.barcode') as string);
icon: 'none',
title: this.$t('message.barcode') as string,
});
return; return;
} }
let params = { let params = {
@ -82,7 +79,7 @@ export default class stoOutboundDom extends BasePage {
await this.model.BackSweep(params); await this.model.BackSweep(params);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.succeeded') as string, title: this.$t('message.succeeded') as string,
}); });
this.barCode = ''; this.barCode = '';

@ -164,10 +164,7 @@ export default class stoOutboundDom extends BasePage {
// //
async detailed() { async detailed() {
if (!this.form.orderNo) { if (!this.form.orderNo) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as any);
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return; return;
} }
await this.model.queryDetailed(this.form.orderNo); await this.model.queryDetailed(this.form.orderNo);
@ -175,10 +172,7 @@ export default class stoOutboundDom extends BasePage {
} }
BackSweep() { BackSweep() {
if (!this.form.orderNo) { if (!this.form.orderNo) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as any);
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return; return;
} }
sessionStorage.setItem('SweepCode', JSON.stringify(this.form.orderNo)); sessionStorage.setItem('SweepCode', JSON.stringify(this.form.orderNo));
@ -186,16 +180,13 @@ export default class stoOutboundDom extends BasePage {
} }
async query() { async query() {
if (!this.form.orderNo) { if (!this.form.orderNo) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as any);
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return; return;
} }
await this.model.findProdInfoByDN(this.form.orderNo); await this.model.findProdInfoByDN(this.form.orderNo);
if (model.DNcode == '1') { if (model.DNcode == '1') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.successful') as any, title: this.$t('message.successful') as any,
}); });
this.form.productCode = this.model.materielList[0].materialCode; this.form.productCode = this.model.materielList[0].materialCode;
@ -339,10 +330,7 @@ export default class stoOutboundDom extends BasePage {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
if (parseInt(this.form.orderAmount) <= this.form.scanAmount) { if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
uni.showToast({ this.customToast(this.$t('message.product_Tip6') as string);
icon: 'none',
title: this.$t('message.product_Tip6') as string,
});
return; return;
} }
//let selctlist: any = []; //let selctlist: any = [];

@ -255,11 +255,11 @@ export default class stoOutboundDom extends BasePage {
onSubmit() { onSubmit() {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) { 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; return;
} }
if (parseInt(this.form.orderAmount) <= parseInt(this.form.scanAmount)) { 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; return;
} }
let list = [ let list = [
@ -302,7 +302,7 @@ export default class stoOutboundDom extends BasePage {
this.form.scanAmount += 1; this.form.scanAmount += 1;
this.$table.onCheckAllTap(); this.$table.onCheckAllTap();
} else { } 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() { async query() {
if (!this.form.pddNo) { if (!this.form.pddNo) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as string);
icon: 'none',
title: this.$t('message.Commission_tips1') as string,
});
return; return;
} }
let param = { let param = {
@ -100,10 +97,7 @@ export default class ProductCheckReceipt extends BasePage {
}; };
await this.model.queryScrapList(param); await this.model.queryScrapList(param);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.product_Tip8') as string);
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
let num = 0; let num = 0;
this.model.modelList.forEach((item: any) => { this.model.modelList.forEach((item: any) => {
num += item.spQty; num += item.spQty;
@ -129,16 +123,10 @@ export default class ProductCheckReceipt extends BasePage {
// //
async scanning() { async scanning() {
if (!this.form.pddNo) { if (!this.form.pddNo) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as string);
icon: 'none',
title: this.$t('message.Commission_tips1') as string,
});
} }
if (!this.form.barcode) { if (!this.form.barcode) {
uni.showToast({ this.customToast(this.$t('message.barcode') as string);
icon: 'none',
title: this.$t('message.barcode') as string,
});
} }
let params = { let params = {
factoryCode: session.factoryCode, factoryCode: session.factoryCode,
@ -155,10 +143,7 @@ export default class ProductCheckReceipt extends BasePage {
}; };
await this.model.getProductCode(params); await this.model.getProductCode(params);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.product_Tip8') as string);
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
this.total += 1; this.total += 1;
this.model.modelList.forEach((item: any) => { this.model.modelList.forEach((item: any) => {
if (item.locCode == this.wl.value) { if (item.locCode == this.wl.value) {
@ -172,24 +157,15 @@ export default class ProductCheckReceipt extends BasePage {
// //
async onSubmit() { async onSubmit() {
if (this.form.pddNo == '') { if (this.form.pddNo == '') {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip5') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip5') as string,
});
return; return;
} }
if (this.total == '') { if (this.total == '') {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip5') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip5') as string,
});
return; return;
} }
if (!this.Some) { if (!this.Some) {
uni.showToast({ this.customToast(this.$t('message.product_Tip3') as string);
icon: 'none',
title: this.$t('message.product_Tip3') as string,
});
return; return;
} }
const params = { const params = {
@ -205,7 +181,7 @@ export default class ProductCheckReceipt extends BasePage {
await this.model.onTakeoutConfirm(params); await this.model.onTakeoutConfirm(params);
if (this.model.status == 'S') { if (this.model.status == 'S') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.success') as string, title: this.$t('message.success') as string,
}); });
this.form.pddNo = ''; this.form.pddNo = '';

@ -95,10 +95,7 @@ export default class ProductCheckReceipt extends BasePage {
// //
async query() { async query() {
if (!this.form.pddNo) { if (!this.form.pddNo) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as string);
icon: 'none',
title: this.$t('message.Commission_tips1') as string,
});
return; return;
} }
let param = { let param = {
@ -108,11 +105,8 @@ export default class ProductCheckReceipt extends BasePage {
}; };
await this.model.queryScrapList(param); await this.model.queryScrapList(param);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.product_Tip8') as string);
icon: 'none', let num = 0;
title: this.$t('message.product_Tip8') as string,
});
let num: number = 0;
this.model.modelList.forEach((item: any) => { this.model.modelList.forEach((item: any) => {
num += parseFloat(item.spQty); num += parseFloat(item.spQty);
let arr: any = {}; let arr: any = {};
@ -138,16 +132,10 @@ export default class ProductCheckReceipt extends BasePage {
// //
async scanning() { async scanning() {
if (!this.form.pddNo) { if (!this.form.pddNo) {
uni.showToast({ this.customToast(this.$t('message.scrapForm') as string);
icon: 'none',
title: this.$t('message.scrapForm') as string,
});
} }
if (!this.form.barcode) { if (!this.form.barcode) {
uni.showToast({ this.customToast(this.$t('message.barcode') as string);
icon: 'none',
title: this.$t('message.barcode') as string,
});
} }
let params = { let params = {
factoryCode: session.factoryCode, factoryCode: session.factoryCode,
@ -164,10 +152,7 @@ export default class ProductCheckReceipt extends BasePage {
}; };
await this.model.getProductCode(params); await this.model.getProductCode(params);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.product_Tip8') as string);
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
this.total += 1; this.total += 1;
this.model.modelList.forEach((item: any) => { this.model.modelList.forEach((item: any) => {
if (item.productCode == this.wl.value) { if (item.productCode == this.wl.value) {
@ -181,24 +166,15 @@ export default class ProductCheckReceipt extends BasePage {
// //
async onSubmit() { async onSubmit() {
if (this.form.pddNo == '') { if (this.form.pddNo == '') {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip5') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip5') as string,
});
return; return;
} }
if (this.total == '') { if (this.total == '') {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip5') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip5') as string,
});
return; return;
} }
if (!this.Some) { if (!this.Some) {
uni.showToast({ this.customToast(this.$t('message.selectCode') as string);
icon: 'none',
title: this.$t('message.selectCode') as string,
});
return; return;
} }
const params = { const params = {
@ -214,7 +190,7 @@ export default class ProductCheckReceipt extends BasePage {
await this.model.onTakeoutConfirm(params); await this.model.onTakeoutConfirm(params);
if (this.model.status == 'S') { if (this.model.status == 'S') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.success') as string, title: this.$t('message.success') as string,
}); });
this.form.pddNo = ''; this.form.pddNo = '';

@ -99,10 +99,7 @@ export default class ProductCheckReceipt extends BasePage {
// //
async query() { async query() {
if (!this.form.order3) { if (!this.form.order3) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as string);
icon: 'none',
title: this.$t('message.Commission_tips1') as string,
});
return; return;
} }
let param = { let param = {
@ -115,10 +112,7 @@ export default class ProductCheckReceipt extends BasePage {
}; };
await this.model.queryScrapList(param); await this.model.queryScrapList(param);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.product_Tip8') as string);
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
this.wl.value = this.model.choiceCodeList[0].value; this.wl.value = this.model.choiceCodeList[0].value;
this.Some = this.model.recordsList[0]; this.Some = this.model.recordsList[0];
} }
@ -135,22 +129,13 @@ export default class ProductCheckReceipt extends BasePage {
// //
async scanning() { async scanning() {
if (!this.form.order3) { if (!this.form.order3) {
uni.showToast({ this.customToast(this.$t('message.scrapForm') as string);
icon: 'none',
title: this.$t('message.scrapForm') as string,
});
} }
if (!this.Some) { if (!this.Some) {
uni.showToast({ this.customToast(this.$t('message.finishedProduct') as string);
icon: 'none',
title: this.$t('message.finishedProduct') as string,
});
} }
if (!this.form.barcode) { if (!this.form.barcode) {
uni.showToast({ this.customToast(this.$t('message.barcode') as string);
icon: 'none',
title: this.$t('message.barcode') as string,
});
return; return;
} }
let params = { let params = {
@ -162,10 +147,7 @@ export default class ProductCheckReceipt extends BasePage {
}; };
await this.model.getProductCode(params); await this.model.getProductCode(params);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.product_Tip8') as string);
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
this.Some.actualQty += 1; this.Some.actualQty += 1;
} }
} }
@ -188,7 +170,7 @@ export default class ProductCheckReceipt extends BasePage {
await this.model.onTakeoutConfirm(orderlist); await this.model.onTakeoutConfirm(orderlist);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.success') as string, title: this.$t('message.success') as string,
}); });
} }
@ -200,10 +182,7 @@ export default class ProductCheckReceipt extends BasePage {
// //
async bill() { async bill() {
if (!this.form.order3) { if (!this.form.order3) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as string);
icon: 'none',
title: this.$t('message.Commission_tips1') as string,
});
return; return;
} }
await this.model.queryDetailed(this.form.order3); await this.model.queryDetailed(this.form.order3);

@ -121,17 +121,11 @@ export default class productCheckReceipt extends BasePage {
} }
async query() { async query() {
if (this.form.pddNo == '') { if (this.form.pddNo == '') {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as string);
icon: 'none',
title: this.$t('message.Commission_tips1') as string,
});
} }
await this.model.getProductCode(this.form.pddNo); await this.model.getProductCode(this.form.pddNo);
if (model.code == '1') { if (model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.product_Tip8') as string);
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
// //
const storeList = []; const storeList = [];
storeList.push(this.model.WlListaa[0]); storeList.push(this.model.WlListaa[0]);
@ -177,10 +171,7 @@ export default class productCheckReceipt extends BasePage {
// +1 // +1
async scanCode(e: any) { async scanCode(e: any) {
if (!this.form.pddNo) { if (!this.form.pddNo) {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip5') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip5') as string, //
});
return; return;
} }
const list = { const list = {
@ -207,17 +198,11 @@ export default class productCheckReceipt extends BasePage {
this.$form.validate((valid: boolean) => { this.$form.validate((valid: boolean) => {
if (!valid) return; if (!valid) return;
if (!this.form.pddNo) { if (!this.form.pddNo) {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip5') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip5') as string, //
});
return; return;
} }
if (!this.form.originWl.productCode) { if (!this.form.originWl.productCode) {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip6') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip6') as string, //
});
return; return;
} }
if (this.form.originWl.ypQty == this.form.originWl.spQty) { if (this.form.originWl.ypQty == this.form.originWl.spQty) {

@ -2,7 +2,7 @@
<view class="page-product-receipt"> <view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"> <view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
<view class="left"> <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>
<view class="title">{{ $t('message.Scrap') }}</view> <view class="title">{{ $t('message.Scrap') }}</view>
<view class="right"></view> <view class="right"></view>
@ -64,7 +64,7 @@
<u-button type="primary" @click="onSubmit">{{ $t('message.InventoryFinish') }}</u-button> <u-button type="primary" @click="onSubmit">{{ $t('message.InventoryFinish') }}</u-button>
</u-col> </u-col>
<u-col :span="4"> <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-col>
</u-row> </u-row>
</view> </view>
@ -79,10 +79,10 @@ import { VForm, VFormRules } from 'vue/types/form';
import model from './model'; import model from './model';
import { session } from '@/store/modules/session'; import { session } from '@/store/modules/session';
interface OptionType { // interface OptionType {
label: string; // label: string;
value: string; // value: string;
} // }
@Component({ @Component({
components: { components: {
@ -111,22 +111,13 @@ export default class productCheckReceipt extends BasePage {
// //
async scanning() { async scanning() {
if (!this.form.order3) { if (!this.form.order3) {
uni.showToast({ this.customToast(this.$t('message.scrapForm') as string);
icon: 'none',
title: this.$t('message.scrapForm') as string,
});
} }
if (!this.Some) { if (!this.Some) {
uni.showToast({ this.customToast(this.$t('message.finishedProduct') as string);
icon: 'none',
title: this.$t('message.finishedProduct') as string,
});
} }
if (!this.form.barcode) { if (!this.form.barcode) {
uni.showToast({ this.customToast(this.$t('message.barcode') as string);
icon: 'none',
title: this.$t('message.barcode') as string,
});
return; return;
} }
let params = { let params = {
@ -138,10 +129,7 @@ export default class productCheckReceipt extends BasePage {
}; };
await this.model.getProductCode(params); await this.model.getProductCode(params);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.product_Tip8') as string);
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
this.Some.actualQty += 1; this.Some.actualQty += 1;
} }
} }
@ -157,10 +145,7 @@ export default class productCheckReceipt extends BasePage {
// //
async query() { async query() {
if (!this.form.order3) { if (!this.form.order3) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as string);
icon: 'none',
title: this.$t('message.Commission_tips1') as string,
});
return; return;
} }
let param = { let param = {
@ -173,10 +158,7 @@ export default class productCheckReceipt extends BasePage {
}; };
await this.model.queryScrapList(param); await this.model.queryScrapList(param);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.product_Tip8') as string);
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
this.model.recordsList.forEach((item: any) => { this.model.recordsList.forEach((item: any) => {
item.fileNo = ' '; item.fileNo = ' ';
}); });
@ -187,10 +169,7 @@ export default class productCheckReceipt extends BasePage {
// //
async onSubmit() { async onSubmit() {
if (!this.Some.fileNo) { if (!this.Some.fileNo) {
uni.showToast({ this.customToast(this.$t('message.fileNumber') as string);
icon: 'none',
title: this.$t('message.fileNumber') as string,
});
return; return;
} }
const orderlist = [ const orderlist = [
@ -211,7 +190,7 @@ export default class productCheckReceipt extends BasePage {
await this.model.onTakeoutConfirm(orderlist); await this.model.onTakeoutConfirm(orderlist);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.success') as string, title: this.$t('message.success') as string,
}); });
this.Some = {}; this.Some = {};
@ -224,10 +203,7 @@ export default class productCheckReceipt extends BasePage {
// //
async bill() { async bill() {
if (!this.form.order3) { if (!this.form.order3) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as string);
icon: 'none',
title: this.$t('message.Commission_tips1') as string,
});
return; return;
} }
await this.model.queryDetailed(this.form.order3); await this.model.queryDetailed(this.form.order3);

@ -37,10 +37,7 @@ export default class RawReceiptDetail extends BasePage {
} }
async generate() { async generate() {
if (this.userDefined4 == '') { if (this.userDefined4 == '') {
uni.showToast({ this.customToast(this.$t('message._tips6') as any);
icon: 'none',
title: this.$t('message._tips6') as any,
});
return; return;
} }
let content = { let content = {

@ -101,16 +101,13 @@ export default class productCheckReceipt extends BasePage {
// //
async query() { async query() {
if (this.form.productCode == ' ' || this.form.productCode.length == 0) { if (this.form.productCode == ' ' || this.form.productCode.length == 0) {
uni.showToast({ this.customToast(this.$t('message.product_unit7') as string);
icon: 'none',
title: this.$t('message.product_unit7') as string,
});
return; return;
} }
await model.getProductCode(this.form.productCode); await model.getProductCode(this.form.productCode);
if (model.code == '1') { if (model.code == '1') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.successful') as string, title: this.$t('message.successful') as string,
}); });
} }
@ -141,31 +138,19 @@ export default class productCheckReceipt extends BasePage {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
if (this.userDefined4 == ' ' || this.userDefined4.length == 0) { if (this.userDefined4 == ' ' || this.userDefined4.length == 0) {
uni.showToast({ this.customToast(this.$t('message.LibraryCode') as string);
icon: 'none',
title: this.$t('message.LibraryCode') as string,
});
return; return;
} }
if (!this.form.productCode) { if (!this.form.productCode) {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip5') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip5') as string,
});
return; return;
} }
if (!this.form.aimWl.value) { if (!this.form.aimWl.value) {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip3') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip3') as string,
});
return; return;
} }
if (this.form.aimWl.value == model.orderInInfo.locCode) { if (this.form.aimWl.value == model.orderInInfo.locCode) {
uni.showToast({ this.customToast(this.$t('message.TargetLocation') as string);
icon: 'none',
title: this.$t('message.TargetLocation') as string,
});
return; return;
} }
const orderlist = [ const orderlist = [
@ -183,10 +168,7 @@ export default class productCheckReceipt extends BasePage {
]; ];
await this.model.onTakeoutConfirm(orderlist); await this.model.onTakeoutConfirm(orderlist);
if (model.code == '1') { if (model.code == '1') {
uni.showToast({ this.customToast(this.$t('message.Warehouse_Tip9') as string);
icon: 'none',
title: this.$t('message.Warehouse_Tip9') as string,
});
this.form.productCode = ''; this.form.productCode = '';
model.empty(); model.empty();
setTimeout(() => { setTimeout(() => {

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

Loading…
Cancel
Save