虚拟库优化 拣配&交接优化

master
hou 4 years ago
parent 95bdcdd6e6
commit 2930741818

@ -136,6 +136,7 @@ export default {
Pi_tip: '提示',
Pi_tip5: '上传成功',
Pi_tip6: '本次拣配数量+拣配数量不允许大于需求数量',
Pi_tip14: '本次交接数量+累计拣配数量不能大于需求数量',
Pi_tip8: '本次交接数量+交接数量不允许大于拣配数量',
Pi_tip9: '本次补料数量+已补数量不允许大于需求数量',
Pi_tip12: '本次交接数量必须等于已拣配数量',

@ -170,6 +170,7 @@ export default {
Summary_Tip: 'Unlock fail, Detail:',
Summary_FinishedProductMaterialNumber: 'FG code',
Summary_QuantityOfThisHandover: 'Handover Qty',
Pi_tip14: 'The current handover quantity + cumulative picking quantity cannot be greater than the required quantity',
//补料
Feeding_VoucherNo: 'Document No',

@ -113,7 +113,8 @@ export class AggregatingModule extends VuexModule {
setAggregateListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
const original = this.aggregateList[index];
const newItem = { ...original, hvAmount };
this.aggregateList.splice(index, 1, newItem);
// this.aggregateList.splice(index, 1, newItem);
this.aggregateList[index].hvAmount = hvAmount;
}
/**
@ -124,7 +125,8 @@ export class AggregatingModule extends VuexModule {
setOrderListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
const original = this.orderList[index];
const newItem = { ...original, hvAmount };
this.orderList.splice(index, 1, newItem);
// this.orderList.splice(index, 1, newItem);
this.orderList[index].hvAmount = hvAmount;
}
// setOrderListItemHvAmount(params: { hvAmount: number }) {
// this.orderList

@ -15,8 +15,8 @@
<u-form ref="amountForm" :model="amountForm" :error-type="['toast']">
<u-row class="bottom-info">
<u-col :span="12">
<u-form-item prop="amount" :label="this.$t('message.Summary_Number')" label-width="120rpx">
<u-input type="number" v-model="amountForm.amount" :placeholder="this.$t('message.po_PleaseInput')" />
<u-form-item prop="amount" :label="$t('message.Summary_Number')" label-width="120rpx">
<u-input type="number" v-model="amountForm.amount" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item>
</u-col>
</u-row>
@ -24,13 +24,13 @@
<u-form ref="submitForm" :model="submitForm" :error-type="['toast']">
<u-row class="bottom-info">
<u-col :span="6">
<u-form-item prop="receiverName" :label="this.$t('message.Summary_Receiver')" label-width="120rpx">
<u-input v-model="submitForm.receiverName" @confirm="onReceiverConfirm" :placeholder="this.$t('message.po_PleaseInput')" />
<u-form-item prop="receiverName" :label="$t('message.Summary_Receiver')" label-width="120rpx">
<u-input v-model="submitForm.receiverName" @confirm="onReceiverConfirm" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item>
</u-col>
<u-col :span="6">
<u-form-item prop="password" :label="this.$t('message.Summary_Password')">
<u-input type="password" v-model="submitForm.password" :placeholder="this.$t('message.po_PleaseInput')" />
<u-form-item prop="password" :label="$t('message.Summary_Password')">
<u-input type="password" v-model="submitForm.password" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item>
</u-col>
</u-row>

@ -47,9 +47,10 @@
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
<!-- <div class="u-td" @click="deleteItem(index)">
{{ $t('message.product_Delete') }}
</div>
</div> -->
<u-button type="error" size="small" style="font-size: 20px" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</u-button>
</u-td>
</u-tr>
</u-table>
@ -177,7 +178,7 @@ export default class RawReceiptDetail extends BasePage {
});
return;
}
if (this.some == {}) {
if (JSON.stringify(this.some) == '{}') {
uni.showToast({
icon: 'none',
title: this.$t('message.Commission_tips6') as any,

@ -47,9 +47,10 @@
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
<!-- <div class="u-td" @click="deleteItem(index)">
{{ $t('message.product_Delete') }}
</div>
</div> -->
<u-button type="error" size="small" style="font-size: 20px" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</u-button>
</u-td>
</u-tr>
</u-table>

@ -4,20 +4,11 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t("message.rawMenu_virtual_Handover_QR") }}</view>
<view class="title">{{ $t('message.rawMenu_virtual_Handover_QR') }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
show-left-and-right-border
enable-check="multiple"
:headers="headers"
:contents="model.summaryList"
:show-vert-border="false"
></wyb-table>
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border enable-check="multiple" :headers="headers" :contents="model.summaryList" :show-vert-border="false"></wyb-table>
</view>
<view class="bottom-bar">
<view class="extra">
@ -29,16 +20,8 @@
</u-form-item>
</u-col> -->
<u-col :span="6">
<u-form-item
prop="amount"
:label="this.$t('message.Summary_Number')"
label-width="120rpx"
>
<u-input
type="number"
v-model="amountForm.amount"
:placeholder="this.$t('message.po_PleaseInput')"
/>
<u-form-item prop="amount" :label="this.$t('message.Summary_Number')" label-width="120rpx">
<u-input type="number" v-model="amountForm.amount" :placeholder="this.$t('message.po_PleaseInput')" />
</u-form-item>
</u-col>
</u-row>
@ -46,28 +29,13 @@
<u-form ref="submitForm" :model="submitForm" :error-type="['toast']">
<u-row class="bottom-info">
<u-col :span="6">
<u-form-item
prop="receiverName"
:label="this.$t('message.Summary_Receiver')"
label-width="120rpx"
>
<u-input
v-model="submitForm.receiverName"
@confirm="onReceiverConfirm"
:placeholder="this.$t('message.po_PleaseInput')"
/>
<u-form-item prop="receiverName" :label="this.$t('message.Summary_Receiver')" label-width="120rpx">
<u-input v-model="submitForm.receiverName" @confirm="onReceiverConfirm" :placeholder="this.$t('message.po_PleaseInput')" />
</u-form-item>
</u-col>
<u-col :span="6">
<u-form-item
prop="password"
:label="this.$t('message.Summary_Password')"
>
<u-input
type="password"
v-model="submitForm.password"
:placeholder="this.$t('message.po_PleaseInput')"
/>
<u-form-item prop="password" :label="this.$t('message.Summary_Password')">
<u-input type="password" v-model="submitForm.password" :placeholder="this.$t('message.po_PleaseInput')" />
</u-form-item>
</u-col>
</u-row>
@ -77,12 +45,12 @@
<u-row>
<u-col :span="6">
<u-button type="primary" @click="onOk">
{{ $t("message.dn_Confirm") }}
{{ $t('message.dn_Confirm') }}
</u-button>
</u-col>
<u-col :span="6">
<u-button type="success" @click="onSubmit">
{{ $t("message.po_Submit") }}
{{ $t('message.po_Submit') }}
</u-button>
</u-col>
</u-row>
@ -92,24 +60,24 @@
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "./model";
import { summaryHeaders } from "./config";
import { VForm, VFormRules } from "vue/types/form";
import { auth } from "@/store/modules/auth";
import { pick } from "lodash/fp";
import http from "@/utils/request";
import { url } from "@/utils/url";
import { session } from "@/store/modules/session";
import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { summaryHeaders } from './config';
import { VForm, VFormRules } from 'vue/types/form';
import { auth } from '@/store/modules/auth';
import { pick } from 'lodash/fp';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Component
export default class VirtualSummary extends BasePage {
/**
* 表单引用
*/
@Ref("amountForm") readonly $amountForm!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
@Ref('amountForm') readonly $amountForm!: VForm;
@Ref('submitForm') readonly $submitForm!: VForm;
/**
* 页面Module
@ -131,23 +99,23 @@ export default class VirtualSummary extends BasePage {
*/
amountForm = {
// oriSendSpot: '',
amount: "",
amount: '',
};
/**
* 上传表单
*/
submitForm = {
receiver: "",
receiverName: "",
password: "",
receiver: '',
receiverName: '',
password: '',
};
amountFormRules: VFormRules<any> = {
amount: [
{
required: true,
message: this.$t("message.Summary_PleaseInputNumber") as string,
message: this.$t('message.Summary_PleaseInputNumber') as string,
},
],
};
@ -156,13 +124,13 @@ export default class VirtualSummary extends BasePage {
receiver: [
{
required: true,
message: this.$t("message.Summary_PleaseInputReceiver") as string,
message: this.$t('message.Summary_PleaseInputReceiver') as string,
},
],
password: [
{
required: true,
message: this.$t("message.Summary_PleaseInputPassword") as string,
message: this.$t('message.Summary_PleaseInputPassword') as string,
},
],
};
@ -209,12 +177,12 @@ export default class VirtualSummary extends BasePage {
const firstRecord = model.summaryList[0];
if (firstRecord === undefined) {
uni.showToast({
icon: "none",
title: this.$t("message.LBWK") as string,
icon: 'none',
title: this.$t('message.LBWK') as string,
});
return;
}
console.log("firstRecord", firstRecord);
console.log('firstRecord', firstRecord);
await model.checkAmount({
sapFactoryCode: model.sapFactoryCode,
loginName: session.loginName as string,
@ -229,25 +197,36 @@ export default class VirtualSummary extends BasePage {
const firstSelection = this.model.summaryList.find((_: any) => _.checked);
if (firstSelection === undefined) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip7") as string,
icon: 'none',
title: this.$t('message.Pi_tip7') as string,
});
} else {
const inputAmount = parseFloat(this.amountForm.amount);
const inputAmount = parseFloat(this.amountForm.amount); //
const totalHvAmount = firstSelection.totalHvAmount;
const totalMoAmount = firstSelection.totalMoAmount;
if (inputAmount + totalHvAmount - totalMoAmount > 0.000001) {
const demand = firstSelection.amount; //
const totalMoAmount = firstSelection.totalMoAmount; //
console.log('2222', 2222222222222222222);
if (inputAmount + totalMoAmount > demand) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip8") as string,
icon: 'none',
title: this.$t('message.Pi_tip14') as string,
});
} else if (
return;
}
console.log(1);
// if (inputAmount + totalHvAmount - totalMoAmount > 0.000001) {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.Pi_tip8') as string,
// });
// }
if (
inputAmount <= 0
// inputAmount.toString().split(".")[1].length > 3
) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip2") as string,
icon: 'none',
title: this.$t('message.Pi_tip2') as string,
});
} else {
// model.updateSummaryItem({
@ -264,8 +243,8 @@ export default class VirtualSummary extends BasePage {
}
});
uni.showToast({
icon: "none",
title: this.$t("message.success") as string,
icon: 'none',
title: this.$t('message.success') as string,
});
}
}
@ -280,11 +259,11 @@ export default class VirtualSummary extends BasePage {
if (valid) {
let qtyStase = false;
let selectsta = true;
console.log("qqq", model.summaryList);
console.log('qqq', model.summaryList);
if (model.summaryList.length === 0) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
});
return;
} else {
@ -301,15 +280,15 @@ export default class VirtualSummary extends BasePage {
}
if (selectsta) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
});
return;
}
if (qtyStase) {
uni.showToast({
icon: "none",
title: this.$t("message.Summary_PleaseInputNumber") as string,
icon: 'none',
title: this.$t('message.Summary_PleaseInputNumber') as string,
});
return;
}
@ -329,16 +308,16 @@ export default class VirtualSummary extends BasePage {
dataList: model.summaryList.map((item) => ({
...pick(
[
"materialCode",
"materialDesc",
"unit",
"wkposCode",
"prdMaterialDesc",
"sendSpot",
'materialCode',
'materialDesc',
'unit',
'wkposCode',
'prdMaterialDesc',
'sendSpot',
// 'oriSendSpot',
"mrpCode",
'mrpCode',
],
item
item,
),
amount: String(item.amount),
hvAmount: String(item.hvAmount),
@ -346,13 +325,11 @@ export default class VirtualSummary extends BasePage {
totalHvAmount: String(item.totalHvAmount),
factoryCode: model.sapFactoryCode,
})),
includeOrderOutIdList: model.proOrderResultList.map(
(item: any) => item.orderOutId
),
includeOrderOutIdList: model.proOrderResultList.map((item: any) => item.orderOutId),
});
this.submitForm.receiverName = "";
this.submitForm.receiver = "";
this.submitForm.password = "";
this.submitForm.receiverName = '';
this.submitForm.receiver = '';
this.submitForm.password = '';
this.isBusinessFinished = true;
model.clearProOrderResultList();
setTimeout(() => {
@ -374,8 +351,8 @@ export default class VirtualSummary extends BasePage {
});
} catch (e) {
uni.showToast({
icon: "none",
title: (this.$t("message.Summary_Tip") as string) + e.message,
icon: 'none',
title: (this.$t('message.Summary_Tip') as string) + e.message,
});
}
}
@ -384,8 +361,7 @@ export default class VirtualSummary extends BasePage {
<style lang="scss" scoped>
.page-aggregating-order {
background: #f2f2f2
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;

@ -196,6 +196,11 @@ export default class dnReceiptDom extends BasePage {
item.value = item.poNo;
});
this.poList = arr;
//
this.poListChoice({
pickerName: this.poList.find(() => true),
});
}
//
// list valueKey
@ -237,13 +242,21 @@ export default class dnReceiptDom extends BasePage {
// this.materialList.push(pickerName);
// }
// });
//
this.materialChoice({
pickerName: this.materialList.find(() => true),
});
}
// receiptAmount requestAmount every=
materialChoice(e: any) {
//
this.every = { ...e.pickerName };
this.newLocation = [];
this.newLocation = this.Location.filter((item: any) => item.sendSpot === this.every.sendSpot);
console.log('newLoction', this.newLocation);
this.LocationChoice({
pickerName: this.newLocation.find(() => true),
});
}
//
LocationChoice(e: any) {

@ -55,7 +55,7 @@
<view class="library">
<view class="library-left">
<view>{{ $t('message.CommissionedLocation') }}</view>
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="newLocation" />
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="Location" />
</view>
<view class="library-right">
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
@ -247,6 +247,8 @@ export default class dnReceiptDom extends BasePage {
async materialChoice(e: any) {
//
this.every = { ...e.pickerName };
//
this.Location = [];
//
this.Location = await this.initLocation(this.every);
@ -318,7 +320,6 @@ export default class dnReceiptDom extends BasePage {
this.LocationList = [];
//
this.Location = [];
this.newLocation = [];
this.poNo = '';
this.poList = [];
//

Loading…
Cancel
Save