cosmoim-852 fix 增加防抖&&退料问题修复优化

master
hou 3 years ago
parent 257b50aa41
commit 60191a09a3

@ -303,6 +303,7 @@ export default {
Outbound: '出库库位', Outbound: '出库库位',
Warehousing: '入库库位', Warehousing: '入库库位',
PleaseQuantity: '请输入本次数量', PleaseQuantity: '请输入本次数量',
the: '本次数量',
CommissionedGoOutDetails: '出库明细', CommissionedGoOutDetails: '出库明细',
CommissionedDetails: '出库明细', CommissionedDetails: '出库明细',
closing: '确认关闭订单?', closing: '确认关闭订单?',

@ -228,6 +228,7 @@ export default {
return_Tip2: 'Factory code cannot be empty', return_Tip2: 'Factory code cannot be empty',
return_Tip3: 'Qty cannot be empty', return_Tip3: 'Qty cannot be empty',
return_Tip4: 'Return Qty cannot be greater than total Qty', return_Tip4: 'Return Qty cannot be greater than total Qty',
the: 'The Qty',
quantitys: 'Cannot be greater than the quantity to be returned', quantitys: 'Cannot be greater than the quantity to be returned',
actual: 'The actual returned quantity is not equal to the quantity to be returned', actual: 'The actual returned quantity is not equal to the quantity to be returned',
receiveAStation: 'Receiving', receiveAStation: 'Receiving',

@ -150,7 +150,7 @@ export default class LoginPage extends BasePage {
console.log('image', this.image); console.log('image', this.image);
console.log('Version////', this.Version); console.log('Version////', this.Version);
} }
Version = '1.0.20'; Version = '1.0.22';
compareVersion(version1: any, version2: any) { compareVersion(version1: any, version2: any) {
//version1 1 &&& version2 -1 //version1 1 &&& version2 -1
const newVersion1 = `${version1}`.split('.').length < 3 ? `${version1}`.concat('.0') : `${version1}`; const newVersion1 = `${version1}`.split('.').length < 3 ? `${version1}`.concat('.0') : `${version1}`;
@ -191,7 +191,6 @@ export default class LoginPage extends BasePage {
let downloadApkUrl = session.url; let downloadApkUrl = session.url;
uni.showLoading({ uni.showLoading({
title: vm.$t('message.uploading') as string, title: vm.$t('message.uploading') as string,
//title: '..........',
}); });
////////////////uni, ////////////////uni,
uni.downloadFile({ uni.downloadFile({

@ -25,8 +25,7 @@
</u-form-item> </u-form-item>
<!-- 物料号 --> <!-- 物料号 -->
<u-form-item :required="true" :label="$t('message.Pi_materielNo')" prop="materialCode"> <u-form-item :required="true" :label="$t('message.Pi_materielNo')" prop="materialCode">
<u-input v-model="form.materialCode" type="select" @click="materialCodeSelect = true" :placeholder="$t('message.po_PleaseInput')" /> <jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="materialConfirm" showKey="value" valKey="value" :val="materieCode.value" class="search" :options="model.materielList" />
<u-select :confirm-text="$t('message.product_Confirm')" :cancel-text="$t('message.product_Cancel')" v-model="materialCodeSelect" :list="model.materielList" @confirm="materialConfirm"></u-select>
</u-form-item> </u-form-item>
<!-- 工位 --> <!-- 工位 -->
<u-form-item :label="$t('message.Pi_Station')"> <u-form-item :label="$t('message.Pi_Station')">
@ -48,12 +47,12 @@
<!-- 工厂 --> <!-- 工厂 -->
<u-row gutter="0"> <u-row gutter="0">
<u-col :span="6"> <u-col :span="6">
<u-form-item :label="$t('message.QuantityReturned')" prop="sapFactoryCode"> <u-form-item :label="$t('message.Summary_Number')" prop="sapFactoryCode">
<u-input style="flex: 0.9" :disabled="true" v-model="form.totalBackAmount" placeholder="" /> <u-input style="flex: 0.9" :disabled="true" v-model="materielAmount" placeholder="" />
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="6"> <u-col :span="6">
<u-form-item :required="true" :label="$t('message.Summary_Number')" prop="amount" label-width="80rpx"> <u-form-item :required="true" :label="$t('message.the')" prop="amount" label-width="80rpx">
<u-input v-model="form.amount" :border="border" type="number" :placeholder="$t('message.po_PleaseInput')" style="margin-left: 12px" /> <u-input v-model="form.amount" :border="border" type="number" :placeholder="$t('message.po_PleaseInput')" style="margin-left: 12px" />
</u-form-item> </u-form-item>
</u-col> </u-col>
@ -123,8 +122,10 @@ export default class returningDom extends BasePage {
wlCode: '' as any, wlCode: '' as any,
totalBackAmount: '0', totalBackAmount: '0',
}; };
materielAmount: any = '';
prdOrder: any = []; prdOrder: any = [];
wlCode: any = ''; wlCode: any = '';
materieCode: any = '';
Location: any = []; Location: any = [];
/** /**
* 工位退料人名称 * 工位退料人名称
@ -155,6 +156,8 @@ export default class returningDom extends BasePage {
this.form.materialCode = this.model.orderInInfo.materialCode; this.form.materialCode = this.model.orderInInfo.materialCode;
this.form.sendSpot = this.model.orderInInfo.sendSpot; this.form.sendSpot = this.model.orderInInfo.sendSpot;
this.form.totalBackAmount = this.model.orderInInfo.totalBackAmount; this.form.totalBackAmount = this.model.orderInInfo.totalBackAmount;
this.materielAmount = this.model.orderInInfo.amount;
this.materieCode = this.model.materielList[0];
} }
LocationChoice(e: any) { LocationChoice(e: any) {
this.wlCode = e.pickerName; this.wlCode = e.pickerName;
@ -198,11 +201,12 @@ export default class returningDom extends BasePage {
this.$form.resetFields(); this.$form.resetFields();
} }
materialConfirm(v: any) { materialConfirm(v: any) {
this.form.materialCode = v[0].value; this.materieCode = v.pickerName;
this.model.materielList.forEach((item: any) => { this.model.materielList.forEach((item: any) => {
if (this.form.materialCode == item.label) { if (this.materieCode.value == item.label) {
this.form.sendSpot = item.sendSpot; this.form.sendSpot = item.sendSpot;
this.form.totalBackAmount = item.totalBackAmount; this.form.totalBackAmount = item.totalBackAmount;
this.materielAmount = item.amount;
} }
}); });
} }
@ -210,25 +214,16 @@ export default class returningDom extends BasePage {
* 上传 * 上传
*/ */
onSubmit() { onSubmit() {
if (this.form.amount > this.model.orderInInfo.amount) { if (parseFloat(this.form.amount) > parseFloat(this.materielAmount)) {
this.customToast(this.$t('message.return_Tip4') as string); this.customToast(this.$t('message.return_Tip4') as string);
} else { } else {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
// if (!this.model.orderInInfo.sapFactoryCode) {
// this.customToast(this.$t('message.return_Tip2') as string);
// }
// (this.form.sendSpot as any) = this.model.orderInInfo.sendSpot;
(this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode; (this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode;
// delete this.form.wlName;
this.form.wlCode = this.wlCode.label; this.form.wlCode = this.wlCode.label;
await this.model.tluSubmit(this.form); await this.model.tluSubmit(this.form);
// this.$form.resetFields();
this.operatorName = ''; this.operatorName = '';
// this.form.sendSpot = '';
// this.form.wkposCode = '';
this.model.orderInInfo.sapFactoryCode = ''; this.model.orderInInfo.sapFactoryCode = '';
// this.model.materielList = [];
this.model.materielList.length = 0; this.model.materielList.length = 0;
this.empty(); this.empty();
}); });
@ -276,13 +271,16 @@ export default class returningDom extends BasePage {
font-size: 34rpx; font-size: 34rpx;
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
.title { .title {
flex: 3; flex: 3;
} }
.left, .left,
.right { .right {
flex: 1; flex: 1;
} }
.icon { .icon {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -302,6 +300,7 @@ export default class returningDom extends BasePage {
padding: 30rpx 0; padding: 30rpx 0;
line-height: 35rpx; line-height: 35rpx;
} }
.newly { .newly {
display: flex; display: flex;
} }

@ -33,8 +33,8 @@
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="every.materialCode" class="search" :options="materialList" /> <jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="every.materialCode" class="search" :options="materialList" />
</view> </view>
</view> </view>
<view class="material" <view class="material">
><view class="material-right"> <view class="material-right">
<view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view> <view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view>
<view class="material-right-code" style="overflow: hidden">{{ every.materialDesc }}</view> <view class="material-right-code" style="overflow: hidden">{{ every.materialDesc }}</view>
</view> </view>
@ -75,7 +75,7 @@
<u-button type="primary" @click="bill">{{ $t('message.detailed') }}</u-button> <u-button type="primary" @click="bill">{{ $t('message.detailed') }}</u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="primary" @click="onSubmit">{{ $t('message.po_Submit') }}</u-button> <u-button type="primary" @click="Submit">{{ $t('message.po_Submit') }}</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>
@ -397,6 +397,16 @@ export default class dnReceiptDom extends BasePage {
this.receiptAmount = null; this.receiptAmount = null;
this.DNReceivingList = []; this.DNReceivingList = [];
} }
debounce(fun: any, time: any) {
let timer: any;
return function () {
clearTimeout(timer);
let args = arguments;
timer = setTimeout(() => {
fun.apply(this, args);
}, time);
};
}
async onSubmit() { async onSubmit() {
if (this.LocationList.length === 0) { if (this.LocationList.length === 0) {
this.customToast(this.$t('message.Commission_tips5') as any); this.customToast(this.$t('message.Commission_tips5') as any);
@ -426,6 +436,9 @@ export default class dnReceiptDom extends BasePage {
}); });
} }
} }
Submit() {
this.debounce(this.onSubmit(), 1000);
}
async bill() { async bill() {
if (this.form.documentNo == '') { if (this.form.documentNo == '') {
this.customToast(this.$t('message._tips6') as any); this.customToast(this.$t('message._tips6') as any);
@ -447,6 +460,7 @@ export default class dnReceiptDom extends BasePage {
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx; padding: 118rpx 30rpx 162rpx;
min-height: 100%; min-height: 100%;
.header { .header {
position: fixed; position: fixed;
top: 36rpx; top: 36rpx;
@ -460,13 +474,16 @@ export default class dnReceiptDom extends BasePage {
font-size: 34rpx; font-size: 34rpx;
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
.title { .title {
flex: 3; flex: 3;
} }
.left, .left,
.right { .right {
flex: 1; flex: 1;
} }
.icon { .icon {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -475,25 +492,30 @@ export default class dnReceiptDom extends BasePage {
height: 88rpx; height: 88rpx;
} }
} }
.content { .content {
width: 100%; width: 100%;
background: white; background: white;
border-radius: 15rpx; border-radius: 15rpx;
padding: 10rpx; padding: 10rpx;
.single { .single {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
display: flex; display: flex;
.single-left { .single-left {
width: 80%; width: 80%;
height: 100%; height: 100%;
display: flex; display: flex;
view { view {
width: 110rpx; width: 110rpx;
height: 100%; height: 100%;
line-height: 100rpx; line-height: 100rpx;
} }
} }
.single-right { .single-right {
button { button {
margin-top: 15rpx; margin-top: 15rpx;
@ -502,18 +524,22 @@ export default class dnReceiptDom extends BasePage {
} }
} }
} }
.Purchase-title { .Purchase-title {
width: 100%; width: 100%;
.Purchase { .Purchase {
width: 60%; width: 60%;
height: 100%; height: 100%;
display: flex; display: flex;
view { view {
width: 140rpx; width: 140rpx;
line-height: 100rpx; line-height: 100rpx;
} }
} }
} }
// .material { // .material {
// width: 100%; // width: 100%;
// height: 100rpx; // height: 100rpx;
@ -532,25 +558,30 @@ export default class dnReceiptDom extends BasePage {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
display: flex; display: flex;
.material-left { .material-left {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
view { view {
width: 140rpx; width: 140rpx;
line-height: 100rpx; line-height: 100rpx;
text-align: left; text-align: left;
} }
} }
.material-right { .material-right {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
.material-right-title { .material-right-title {
width: 140rpx; width: 140rpx;
height: 100%; height: 100%;
line-height: 100rpx; line-height: 100rpx;
} }
.material-right-code { .material-right-code {
width: 80%; width: 80%;
height: 100%; height: 100%;
@ -560,18 +591,22 @@ export default class dnReceiptDom extends BasePage {
} }
} }
} }
.number { .number {
height: 100rpx; height: 100rpx;
display: flex; display: flex;
.number-left { .number-left {
width: 45%; width: 45%;
height: 100%; height: 100%;
display: flex; display: flex;
.number-left-title { .number-left-title {
width: 120rpx; width: 120rpx;
height: 100%; height: 100%;
line-height: 100rpx; line-height: 100rpx;
} }
.input { .input {
width: 200rpx; width: 200rpx;
height: 70rpx; height: 70rpx;
@ -579,16 +614,19 @@ export default class dnReceiptDom extends BasePage {
margin-left: 15rpx; margin-left: 15rpx;
} }
} }
.number-right { .number-right {
width: 55%; width: 55%;
height: 100%; height: 100%;
display: flex; display: flex;
.number-right-title { .number-right-title {
width: 140rpx; width: 140rpx;
height: 100%; height: 100%;
//text-align: center; //text-align: center;
line-height: 100rpx; line-height: 100rpx;
} }
.input { .input {
width: 200rpx; width: 200rpx;
height: 70rpx; height: 70rpx;
@ -597,6 +635,7 @@ export default class dnReceiptDom extends BasePage {
} }
} }
} }
// .library { // .library {
// width: 100%; // width: 100%;
// height: 100rpx; // height: 100rpx;
@ -634,6 +673,7 @@ export default class dnReceiptDom extends BasePage {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
position: relative; position: relative;
button { button {
position: absolute; position: absolute;
top: 10rpx; top: 10rpx;
@ -641,6 +681,7 @@ export default class dnReceiptDom extends BasePage {
} }
} }
} }
.bottom-bar { .bottom-bar {
position: fixed; position: fixed;
bottom: 0; bottom: 0;

@ -33,8 +33,8 @@
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="every.materialCode" class="search" :options="materialList" /> <jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="every.materialCode" class="search" :options="materialList" />
</view> </view>
</view> </view>
<view class="material" <view class="material">
><view class="material-right"> <view class="material-right">
<view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view> <view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view>
<view class="material-right-code" style="overflow: hidden">{{ every.materialDesc }}</view> <view class="material-right-code" style="overflow: hidden">{{ every.materialDesc }}</view>
</view> </view>
@ -76,7 +76,7 @@
<u-button type="primary" @click="bill">{{ $t('message.detailed') }}</u-button> <u-button type="primary" @click="bill">{{ $t('message.detailed') }}</u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="primary" @click="onSubmit">{{ $t('message.po_Submit') }}</u-button> <u-button type="primary" @click="Submit">{{ $t('message.po_Submit') }}</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>
@ -400,6 +400,16 @@ export default class dnReceiptDom extends BasePage {
this.receiptAmount = null; this.receiptAmount = null;
this.DNReceivingList = []; this.DNReceivingList = [];
} }
debounce(fun: any, time: any) {
let timer: any;
return function () {
clearTimeout(timer);
let args = arguments;
timer = setTimeout(() => {
fun.apply(this, args);
}, time);
};
}
async onSubmit() { async onSubmit() {
if (this.LocationList.length === 0) { if (this.LocationList.length === 0) {
this.customToast(this.$t('message.Commission_tips5') as any); this.customToast(this.$t('message.Commission_tips5') as any);
@ -417,9 +427,7 @@ export default class dnReceiptDom extends BasePage {
loginName: session.loginName, loginName: session.loginName,
}, },
success: (res: any) => { success: (res: any) => {
console.log(res.data);
if (res.data.code != '0' && res.data.list != null) { if (res.data.code != '0' && res.data.list != null) {
// this.empty();
this.resetForm(); this.resetForm();
} else if (res.data.code == '0' && res.data.list == null) { } else if (res.data.code == '0' && res.data.list == null) {
this.empty(); this.empty();
@ -429,6 +437,9 @@ export default class dnReceiptDom extends BasePage {
}); });
} }
} }
Submit() {
this.debounce(this.onSubmit(), 1000);
}
async bill() { async bill() {
if (this.form.documentNo == '') { if (this.form.documentNo == '') {
this.customToast(this.$t('message._tips6') as any); this.customToast(this.$t('message._tips6') as any);
@ -450,6 +461,7 @@ export default class dnReceiptDom extends BasePage {
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx; padding: 118rpx 30rpx 162rpx;
min-height: 100%; min-height: 100%;
.header { .header {
position: fixed; position: fixed;
top: 36rpx; top: 36rpx;
@ -463,13 +475,16 @@ export default class dnReceiptDom extends BasePage {
font-size: 34rpx; font-size: 34rpx;
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
.title { .title {
flex: 3; flex: 3;
} }
.left, .left,
.right { .right {
flex: 1; flex: 1;
} }
.icon { .icon {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -478,25 +493,30 @@ export default class dnReceiptDom extends BasePage {
height: 88rpx; height: 88rpx;
} }
} }
.content { .content {
width: 100%; width: 100%;
background: white; background: white;
border-radius: 15rpx; border-radius: 15rpx;
padding: 10rpx; padding: 10rpx;
.single { .single {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
display: flex; display: flex;
.single-left { .single-left {
width: 80%; width: 80%;
height: 100%; height: 100%;
display: flex; display: flex;
view { view {
width: 110rpx; width: 110rpx;
height: 100%; height: 100%;
line-height: 100rpx; line-height: 100rpx;
} }
} }
.single-right { .single-right {
button { button {
margin-top: 15rpx; margin-top: 15rpx;
@ -505,18 +525,22 @@ export default class dnReceiptDom extends BasePage {
} }
} }
} }
.Purchase-title { .Purchase-title {
width: 100%; width: 100%;
.Purchase { .Purchase {
width: 60%; width: 60%;
height: 100%; height: 100%;
display: flex; display: flex;
view { view {
width: 140rpx; width: 140rpx;
line-height: 100rpx; line-height: 100rpx;
} }
} }
} }
// .material { // .material {
// width: 100%; // width: 100%;
// height: 100rpx; // height: 100rpx;
@ -535,25 +559,30 @@ export default class dnReceiptDom extends BasePage {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
display: flex; display: flex;
.material-left { .material-left {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
view { view {
width: 140rpx; width: 140rpx;
line-height: 100rpx; line-height: 100rpx;
text-align: left; text-align: left;
} }
} }
.material-right { .material-right {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
.material-right-title { .material-right-title {
width: 140rpx; width: 140rpx;
height: 100%; height: 100%;
line-height: 100rpx; line-height: 100rpx;
} }
.material-right-code { .material-right-code {
width: 80%; width: 80%;
height: 100%; height: 100%;
@ -563,18 +592,22 @@ export default class dnReceiptDom extends BasePage {
} }
} }
} }
.number { .number {
height: 100rpx; height: 100rpx;
display: flex; display: flex;
.number-left { .number-left {
width: 45%; width: 45%;
height: 100%; height: 100%;
display: flex; display: flex;
.number-left-title { .number-left-title {
width: 120rpx; width: 120rpx;
height: 100%; height: 100%;
line-height: 100rpx; line-height: 100rpx;
} }
.input { .input {
width: 200rpx; width: 200rpx;
height: 70rpx; height: 70rpx;
@ -582,16 +615,19 @@ export default class dnReceiptDom extends BasePage {
margin-left: 15rpx; margin-left: 15rpx;
} }
} }
.number-right { .number-right {
width: 55%; width: 55%;
height: 100%; height: 100%;
display: flex; display: flex;
.number-right-title { .number-right-title {
width: 140rpx; width: 140rpx;
height: 100%; height: 100%;
//text-align: center; //text-align: center;
line-height: 100rpx; line-height: 100rpx;
} }
.input { .input {
width: 200rpx; width: 200rpx;
height: 70rpx; height: 70rpx;
@ -600,6 +636,7 @@ export default class dnReceiptDom extends BasePage {
} }
} }
} }
// .library { // .library {
// width: 100%; // width: 100%;
// height: 100rpx; // height: 100rpx;
@ -637,6 +674,7 @@ export default class dnReceiptDom extends BasePage {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
position: relative; position: relative;
button { button {
position: absolute; position: absolute;
top: 10rpx; top: 10rpx;
@ -644,6 +682,7 @@ export default class dnReceiptDom extends BasePage {
} }
} }
} }
.bottom-bar { .bottom-bar {
position: fixed; position: fixed;
bottom: 0; bottom: 0;

Loading…
Cancel
Save