cosmoim-852 fix bug修复和优化调整

master
FEC7\houzeyun 3 years ago
parent ef4b956053
commit 4559baec27

@ -15,7 +15,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"[vue]": { "[vue]": {
"editor.defaultFormatter": "octref.vetur" "editor.defaultFormatter": "Vue.volar"
}, },
"[json]": { "[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"

21071
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -294,7 +294,7 @@ export default class LoginPage extends BasePage {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (valid) { if (valid) {
if (!server.isServerAddressSet) { if (!server.isServerAddressSet) {
await uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: this.$t('message.Tip') as string, title: this.$t('message.Tip') as string,
}); });

@ -223,7 +223,7 @@ export default class returningDom extends BasePage {
this.LocationList[this.LocationList.length - 1].rfPwd = this.rfPwd; this.LocationList[this.LocationList.length - 1].rfPwd = this.rfPwd;
this.LocationList[this.LocationList.length - 1].loginName = this.operator; this.LocationList[this.LocationList.length - 1].loginName = this.operator;
this.LocationList[this.LocationList.length - 1].operatorPass = this.operator; this.LocationList[this.LocationList.length - 1].operatorPass = this.operator;
this.LocationList[this.LocationList.length - 1].wkposCode = this.wlCode.label; this.LocationList[this.LocationList.length - 1].wkposCode = this.wlCode.sendSpot;
this.model.materielList[this.checkindex].totalAmount = this.accSubtract(this.LocationList[this.LocationList.length - 1].totalAmount, this.qty); this.model.materielList[this.checkindex].totalAmount = this.accSubtract(this.LocationList[this.LocationList.length - 1].totalAmount, this.qty);
this.Container = ''; this.Container = '';
this.Barcode = ''; this.Barcode = '';

@ -307,6 +307,7 @@ export default class dnReceiptDom extends BasePage {
} }
Container: any = {}; Container: any = {};
async searchBarcode() { async searchBarcode() {
console.log('receiptAmount', this.receiptAmount);
if (this.Barcode == '') { if (this.Barcode == '') {
this.customToast(this.$t('message.barcode') as string); this.customToast(this.$t('message.barcode') as string);
return; return;
@ -332,6 +333,10 @@ export default class dnReceiptDom extends BasePage {
await this.model.searchBarcode(params); await this.model.searchBarcode(params);
this.Container = this.model.ContainerCode; this.Container = this.model.ContainerCode;
this.receiptAmount = parseFloat(this.Container.requestAmount); this.receiptAmount = parseFloat(this.Container.requestAmount);
console.log('Container', this.Container);
console.log('receiptAmount', this.receiptAmount);
console.log(this.disabled);
this.disabled = true; this.disabled = true;
} }
// //
@ -737,16 +742,19 @@ export default class dnReceiptDom extends BasePage {
position: absolute; position: absolute;
top: 351px; top: 351px;
left: 0; left: 0;
button { button {
position: absolute; position: absolute;
top: 3rpx; top: 3rpx;
right: 35rpx; right: 35rpx;
} }
} }
.config { .config {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
position: relative; position: relative;
// top: 420px; // top: 420px;
// left: 0; // left: 0;
button { button {

@ -70,8 +70,8 @@
<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-col :span="6"> <u-col :span="6">
<u-button type="primary" @click="submit">{{ $t('message.InventoryFinish') }} </u-button></u-col <u-button type="primary" @click="submit">{{ $t('message.InventoryFinish') }} </u-button>
> </u-col>
</u-row> </u-row>
</u-form> </u-form>
</view> </view>
@ -97,7 +97,7 @@ export default class KanDanHandOver extends BasePage {
Some: any = {}; Some: any = {};
MaterialList: any = []; MaterialList: any = [];
Barcode: any = ''; Barcode: any = '';
qty = 0; qty: any = 0;
SubmitOrderlist: any = []; SubmitOrderlist: any = [];
Container: any = ''; Container: any = '';
SomeIndex = 0; SomeIndex = 0;
@ -176,7 +176,7 @@ export default class KanDanHandOver extends BasePage {
return; return;
} }
} else { } else {
if (this.qty > this.Container.qty - this.Container.cpRef4) { if (this.qty > this.Container.qty - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.AppendMateriel3') as string); this.customToast(this.$t('message.AppendMateriel3') as string);
return; return;
} }
@ -185,21 +185,25 @@ export default class KanDanHandOver extends BasePage {
if (this.SubmitOrderlist.length != 0) { if (this.SubmitOrderlist.length != 0) {
this.SubmitOrderlist.forEach((item: any) => { this.SubmitOrderlist.forEach((item: any) => {
if (item.barCode == this.Container.barcode) { if (item.barCode == this.Container.barcode) {
num += item.qty; num += parseFloat(item.qty);
} }
}); });
} }
if (this.qty + num > this.Some.qty) { console.log('qty', this.qty);
console.log('num', num);
console.log(parseFloat(this.qty) + num);
console.log(this.Some.qty);
if (parseFloat(this.qty) + num > this.Some.qty) {
this.customToast(this.$t('message.demandQuantity') as string); this.customToast(this.$t('message.demandQuantity') as string);
return; return;
} }
if (this.Container.cpRef4 == null) { if (this.Container.cpRef4 == null) {
if (this.qty + num > this.Container.qty) { if (parseFloat(this.qty) + num > this.Container.qty) {
this.customToast(this.$t('message.AppendMateriel3') as string); this.customToast(this.$t('message.AppendMateriel3') as string);
return; return;
} }
} else { } else {
if (this.qty + num > this.Container.qty - this.Container.cpRef4) { if (parseFloat(this.qty) + num > this.Container.qty - this.Container.cpRef4) {
this.customToast(this.$t('message.AppendMateriel3') as string); this.customToast(this.$t('message.AppendMateriel3') as string);
return; return;
} }
@ -210,10 +214,10 @@ export default class KanDanHandOver extends BasePage {
this.SubmitOrderlist[this.SubmitOrderlist.length - 1].orderType = '2'; this.SubmitOrderlist[this.SubmitOrderlist.length - 1].orderType = '2';
this.SubmitOrderlist[this.SubmitOrderlist.length - 1].qty = this.qty; this.SubmitOrderlist[this.SubmitOrderlist.length - 1].qty = this.qty;
this.SubmitOrderlist[this.SubmitOrderlist.length - 1].barCode = this.Container.barcode; this.SubmitOrderlist[this.SubmitOrderlist.length - 1].barCode = this.Container.barcode;
this.model.orderInInfoList[this.SomeIndex].totalqty += parseFloat(this.qty);
this.qty = 0; this.qty = 0;
this.Container = ''; this.Container = '';
this.Barcode = ''; this.Barcode = '';
this.model.orderInInfoList[this.SomeIndex].totalqty += this.qty;
} }
deleteItem(e: any) { deleteItem(e: any) {
uni.showModal({ uni.showModal({
@ -300,13 +304,16 @@ export default class KanDanHandOver 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;
@ -321,23 +328,28 @@ export default class KanDanHandOver extends BasePage {
padding: 40rpx; padding: 40rpx;
border-radius: 10rpx; border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2); box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item { .u-form-item {
padding: 30rpx 0; padding: 30rpx 0;
line-height: 35rpx; line-height: 35rpx;
.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;
@ -347,12 +359,14 @@ export default class KanDanHandOver extends BasePage {
} }
} }
} }
.add { .add {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
position: absolute; position: absolute;
top: 478px; top: 478px;
left: 0; left: 0;
button { button {
position: absolute; position: absolute;
top: 3rpx; top: 3rpx;
@ -360,23 +374,28 @@ export default class KanDanHandOver extends BasePage {
z-index: 10000; z-index: 10000;
} }
} }
.newly { .newly {
display: flex; display: flex;
} }
.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;
@ -385,12 +404,14 @@ export default class KanDanHandOver extends BasePage {
} }
} }
} }
.title { .title {
margin-bottom: 40rpx; margin-bottom: 40rpx;
color: #1a1a1a; color: #1a1a1a;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
} }
.button-bar { .button-bar {
position: fixed; position: fixed;
bottom: 0; bottom: 0;

@ -78,8 +78,8 @@
<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-col :span="6"> <u-col :span="6">
<u-button type="primary" @click="submit">{{ $t('message.InventoryFinish') }} </u-button></u-col <u-button type="primary" @click="submit">{{ $t('message.InventoryFinish') }} </u-button>
> </u-col>
</u-row> </u-row>
</u-form> </u-form>
</view> </view>
@ -186,13 +186,17 @@ export default class KanDanHandOver extends BasePage {
this.customToast(this.$t('message.scanningContainer') as string); this.customToast(this.$t('message.scanningContainer') as string);
return; return;
} }
if (parseFloat(this.qty) <= 0) {
this.customToast(this.$t('message.AppendMateriel2') as string);
return;
}
if (this.Container.cpRef4 == null) { if (this.Container.cpRef4 == null) {
if (parseFloat(this.qty) <= 0 || parseFloat(this.qty) > this.Container.qty) { if (parseFloat(this.qty) > this.Container.qty) {
this.customToast(this.$t('message.AppendMateriel3') as string); this.customToast(this.$t('message.AppendMateriel3') as string);
return; return;
} }
} else { } else {
if (parseFloat(this.qty) <= 0 || parseFloat(this.qty) > this.Container.qty - parseFloat(this.Container.cpRef4)) { if (parseFloat(this.qty) > this.Container.qty - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.AppendMateriel3') as string); this.customToast(this.$t('message.AppendMateriel3') as string);
return; return;
} }
@ -312,13 +316,16 @@ export default class KanDanHandOver extends BasePage {
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
padding-top: 19px; padding-top: 19px;
.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;
@ -347,23 +354,28 @@ export default class KanDanHandOver extends BasePage {
padding: 30rpx 0; padding: 30rpx 0;
line-height: 35rpx; line-height: 35rpx;
} }
.newly { .newly {
display: flex; display: flex;
} }
.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;
@ -372,12 +384,14 @@ export default class KanDanHandOver extends BasePage {
} }
} }
} }
.add { .add {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
position: absolute; position: absolute;
top: 620px; top: 620px;
left: 0; left: 0;
button { button {
position: absolute; position: absolute;
top: 3rpx; top: 3rpx;
@ -385,12 +399,14 @@ export default class KanDanHandOver extends BasePage {
z-index: 10000; z-index: 10000;
} }
} }
.title { .title {
margin-bottom: 40rpx; margin-bottom: 40rpx;
color: #1a1a1a; color: #1a1a1a;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
} }
.button-bar { .button-bar {
position: fixed; position: fixed;
bottom: 0; bottom: 0;

@ -142,9 +142,9 @@ export default class KanDanHandOver extends BasePage {
await this.model.searchBarcode(params); await this.model.searchBarcode(params);
this.Container = this.model.ContainerCode; this.Container = this.model.ContainerCode;
if (this.Container.cpRef4 == null) { if (this.Container.cpRef4 == null) {
this.total = this.Container.qty; this.total = parseFloat(this.Container.qty);
} else { } else {
this.total = this.Container.qty - this.Container.cpRef4; this.total = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4);
} }
} }
Add() { Add() {
@ -156,7 +156,7 @@ export default class KanDanHandOver extends BasePage {
this.customToast(this.$t('message.Commission_tips6') as string); this.customToast(this.$t('message.Commission_tips6') as string);
return; return;
} }
if (parseFloat(this.orderlist.actualQty) + parseFloat(this.Container.qty) > parseFloat(this.orderlist.qty)) { if (parseFloat(this.orderlist.actualQty) + this.total > parseFloat(this.orderlist.qty)) {
this.customToast(this.$t('message.Commission_tips4') as string); this.customToast(this.$t('message.Commission_tips4') as string);
return; return;
} }
@ -240,13 +240,16 @@ export default class KanDanHandOver extends BasePage {
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
padding-top: 19px; padding-top: 19px;
.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;
@ -255,6 +258,7 @@ export default class KanDanHandOver extends BasePage {
height: 88rpx; height: 88rpx;
} }
} }
.form { .form {
background-color: #fff; background-color: #fff;
padding: 40rpx; padding: 40rpx;
@ -265,14 +269,17 @@ export default class KanDanHandOver extends BasePage {
padding: 30rpx 0; padding: 30rpx 0;
line-height: 35rpx; line-height: 35rpx;
} }
.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%;
@ -280,6 +287,7 @@ export default class KanDanHandOver extends BasePage {
z-index: 10000; z-index: 10000;
} }
} }
.single-right { .single-right {
button { button {
margin-top: 15rpx; margin-top: 15rpx;
@ -288,12 +296,14 @@ export default class KanDanHandOver extends BasePage {
} }
} }
} }
.add { .add {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
position: absolute; position: absolute;
top: 493px; top: 493px;
left: 0; left: 0;
button { button {
position: absolute; position: absolute;
top: 3rpx; top: 3rpx;
@ -301,10 +311,12 @@ export default class KanDanHandOver extends BasePage {
z-index: 10000; z-index: 10000;
} }
} }
.newly { .newly {
display: flex; display: flex;
} }
} }
.single-right { .single-right {
button { button {
//margin-top: 15rpx; //margin-top: 15rpx;
@ -312,6 +324,7 @@ export default class KanDanHandOver extends BasePage {
height: 70rpx; height: 70rpx;
} }
} }
.bottom-bar { .bottom-bar {
position: fixed; position: fixed;
bottom: 0; bottom: 0;

18884
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save