收货 退货 拣配界面调整

master
hou 4 years ago
parent 8a0e0952fa
commit f1bf749747

@ -65,6 +65,7 @@ export default {
po_PleaseInputcar: "请输入周转车",
po_PleaseSlect: "请选择库存地点",
po_Detailed: "PO单明细",
detailed: "明细",
po_Total: "共",
po_Records: "条",
po_SelectAll: "全选",

@ -120,6 +120,7 @@ export default {
Pi_upload: "Upload",
Pi_tip1: "Please input the pick Qty",
Pi_tip2: "The pick up Qty is an greater than 0",
detailed: "detailed",
Pi_tip3: "Please update the pick up Qty before uploading",
Pi_tip10: "Please update the append Qty before uploading",
Pi_tip4: "No data available to upload",

@ -266,6 +266,30 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/ingoods/dnReceipt/bill",
"style": {
"navigationBarTitleText": "收货明细",
"navigationStyle": "custom",//
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/ingoods/dnReceipt/dnReceiving",
"style": {
"navigationBarTitleText": "DN单收货",
"navigationStyle": "custom",//
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/ingoods/poReceipt/poReceiving",
"style": {
"navigationBarTitleText": "PO单收货",
"navigationStyle": "custom",//
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/ingoods/dnReceipt/idetailed",
"style": {
@ -298,6 +322,14 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/ingoods/dnReturnGoods/Location",
"style": {
"navigationBarTitleText": "DN退货",
"navigationStyle": "custom",//
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/ingoods/dnReturnGoods/detail",
"style": {
@ -314,6 +346,14 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/picking/ByOrder",
"style": {
"navigationBarTitleText": "按单拣配",
"navigationStyle": "custom",//
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/picking/query",
"style": {
@ -338,6 +378,14 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/picking/BySummary",
"style": {
"navigationBarTitleText": "汇总拣配",
"navigationStyle": "custom",//
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/picking/summary",
"style": {
@ -370,6 +418,14 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/feeding/Location",
"style": {
"navigationBarTitleText": "补料",
"navigationStyle": "custom",//
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/feeding/detail",
"style": {

@ -1,11 +1,11 @@
/**
*
*/
import vm from '@/main';
import vm from "@/main";
export const headers = [
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
label: vm.$t("message.Pi_OrderNo"),
key: "prdOrder",
width: 550,
},
];
@ -15,51 +15,51 @@ export const headers = [
*/
export const resultHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
label: vm.$t("message.po_MaterielNo"),
key: "materialCode",
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
label: vm.$t("message.po_DemandQuantity"),
key: "amount",
},
{
label: vm.$t('message.Pi_CumulativePickingQuantity'),
key: 'totalMoAmount',
label: vm.$t("message.Pi_CumulativePickingQuantity"),
key: "totalMoAmount",
width: 300,
},
{
label: vm.$t('message.Pi_HandoverQuantity'),
key: 'totalHvAmount',
label: vm.$t("message.Pi_HandoverQuantity"),
key: "totalHvAmount",
},
{
label: vm.$t('message.Pi_Station'),
key: 'sendSpot',
label: vm.$t("message.Pi_Station"),
key: "sendSpot",
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
label: vm.$t("message.po_MaterielDes"),
key: "materialDesc",
width: 350,
},
{
label: 'MRP',
key: 'mrpCode',
label: "MRP",
key: "mrpCode",
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
label: vm.$t("message.Pi_unit"),
key: "unit",
},
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
label: vm.$t("message.Pi_OrderNo"),
key: "prdOrder",
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'proType',
label: vm.$t("message.Pi_FinishedProductModel"),
key: "proType",
},
{
label: vm.$t('message.po_Location'),
key: 'wkposCode',
label: vm.$t("message.po_Location"),
key: "wkposCode",
},
];
@ -68,47 +68,47 @@ export const resultHeaders = [
*/
export const summaryHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
label: vm.$t("message.po_MaterielNo"),
key: "materialCode",
width: 220,
},
{
label: vm.$t('message.Summary_QuantityOfThisHandover'),
key: 'hvAmount',
label: vm.$t("message.Summary_QuantityOfThisHandover"),
key: "hvAmount",
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
label: vm.$t("message.po_DemandQuantity"),
key: "amount",
},
{
label: vm.$t('message.Pi_CumulativePickingQuantity'),
key: 'totalMoAmount',
label: vm.$t("message.Pi_CumulativePickingQuantity"),
key: "totalMoAmount",
width: 300,
},
{
label: vm.$t('message.Pi_HandoverQuantity'),
key: 'totalHvAmount',
label: vm.$t("message.Pi_HandoverQuantity"),
key: "totalHvAmount",
},
{
label: vm.$t('message.Pi_Station'),
key: 'sendSpot',
label: vm.$t("message.Pi_Station"),
key: "sendSpot",
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
label: vm.$t("message.po_MaterielDes"),
key: "materialDesc",
width: 350,
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
label: vm.$t("message.Pi_unit"),
key: "unit",
},
{
label: vm.$t('message.Summary_FinishedProductMaterialNumber'),
key: 'prdMaterialCode',
label: vm.$t("message.Summary_FinishedProductMaterialNumber"),
key: "prdMaterialCode",
},
{
label: vm.$t('message.po_Location'),
key: 'wkposCode',
label: vm.$t("message.po_Location"),
key: "wkposCode",
},
];
@ -117,54 +117,54 @@ export const summaryHeaders = [
*/
export const orderHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
label: vm.$t("message.po_MaterielNo"),
key: "materialCode",
width: 220,
},
{
label: vm.$t('message.Summary_QuantityOfThisHandover'),
key: 'hvAmount',
label: vm.$t("message.Summary_QuantityOfThisHandover"),
key: "hvAmount",
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
label: vm.$t("message.po_DemandQuantity"),
key: "amount",
},
{
label: vm.$t('message.Pi_CumulativePickingQuantity'),
key: 'totalMoAmount',
label: vm.$t("message.Pi_CumulativePickingQuantity"),
key: "totalMoAmount",
width: 300,
},
{
label: vm.$t('message.Pi_HandoverQuantity'),
key: 'totalHvAmount',
label: vm.$t("message.Pi_HandoverQuantity"),
key: "totalHvAmount",
},
{
label: vm.$t('message.Pi_Station'),
key: 'sendSpot',
label: vm.$t("message.Pi_Station"),
key: "sendSpot",
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
label: vm.$t("message.po_MaterielDes"),
key: "materialDesc",
width: 350,
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
label: vm.$t("message.Pi_unit"),
key: "unit",
},
{
label: 'MRP',
key: 'mrpCode',
label: "MRP",
key: "mrpCode",
},
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
label: vm.$t("message.Pi_OrderNo"),
key: "prdOrder",
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'proType',
label: vm.$t("message.Pi_FinishedProductModel"),
key: "proType",
},
{
label: vm.$t('message.po_Location'),
key: 'wkposCode',
label: vm.$t("message.po_Location"),
key: "wkposCode",
},
];

@ -5,17 +5,17 @@ import {
Action,
MutationAction,
VuexModule,
} from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { cloneDeep } from 'lodash/fp';
} from "vuex-module-decorators";
import store from "@/store";
import http from "@/utils/request";
import { url } from "@/utils/url";
import { cloneDeep } from "lodash/fp";
@Module({
namespaced: true,
dynamic: true,
store,
name: 'raw.handover.aggregating',
name: "raw.handover.aggregating",
})
export class AggregatingModule extends VuexModule {
/**
@ -116,7 +116,13 @@ export class AggregatingModule extends VuexModule {
* @param params
*/
@Mutation
setAggregateListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
setAggregateListItemHvAmount({
index,
hvAmount,
}: {
index: number;
hvAmount: number;
}) {
const original = this.aggregateList[index];
const newItem = { ...original, hvAmount };
this.aggregateList.splice(index, 1, newItem);
@ -127,7 +133,13 @@ export class AggregatingModule extends VuexModule {
* @param params
*/
@Mutation
setOrderListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
setOrderListItemHvAmount({
index,
hvAmount,
}: {
index: number;
hvAmount: number;
}) {
const original = this.orderList[index];
const newItem = { ...original, hvAmount };
this.orderList.splice(index, 1, newItem);
@ -147,7 +159,13 @@ export class AggregatingModule extends VuexModule {
* @param params
*/
@Mutation
setAccessoryListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
setAccessoryListItemHvAmount({
index,
hvAmount,
}: {
index: number;
hvAmount: number;
}) {
const original = this.accessoryList[index];
const newItem = { ...original, hvAmount };
this.accessoryList.splice(index, 1, newItem);
@ -183,8 +201,8 @@ export class AggregatingModule extends VuexModule {
proOrderList.forEach((_: any) => (_.checked = true));
if (!proOrderList.length) {
uni.showToast({
icon: 'none',
title: 'No Data Found',
icon: "none",
title: "No Data Found",
});
}
return { proOrderList };
@ -196,7 +214,10 @@ export class AggregatingModule extends VuexModule {
*/
@MutationAction
async queryProOrderResult(params: any) {
const { list: proOrderResultList }: any = await http.post(url.sumscan.query.ordoutlist, params);
const { list: proOrderResultList }: any = await http.post(
url.sumscan.query.ordoutlist,
params
);
return { proOrderResultList };
}
@ -206,11 +227,14 @@ export class AggregatingModule extends VuexModule {
*/
@MutationAction
async queryAggregateList(params: any) {
const { list: aggregateList }: any = await http.post(url.sumscan.query.hzlist, params);
const { list: aggregateList }: any = await http.post(
url.sumscan.query.hzlist,
params
);
if (!aggregateList.length) {
uni.showToast({
icon: 'none',
title: 'No Data Found',
icon: "none",
title: "No Data Found",
});
}
return { aggregateList };
@ -234,11 +258,14 @@ export class AggregatingModule extends VuexModule {
*/
@MutationAction
async queryAccessoryList(params: any) {
const { list: accessoryList }: any = await http.post(url.sumscan.query.fllist, params);
const { list: accessoryList }: any = await http.post(
url.sumscan.query.fllist,
params
);
if (!accessoryList.length) {
uni.showToast({
icon: 'none',
title: 'No Data Found',
icon: "none",
title: "No Data Found",
});
}
return { accessoryList };
@ -252,8 +279,8 @@ export class AggregatingModule extends VuexModule {
async uploadOrderList(params: any) {
await http.post(url.sumscan.u.order, params);
uni.showToast({
icon: 'success',
title: 'success',
icon: "success",
title: "success",
});
}
@ -265,6 +292,15 @@ export class AggregatingModule extends VuexModule {
async uploadAccessoryList(params: any) {
return http.post(url.sumscan.u.fllist, params);
}
@Action({ commit: "updateCheckedOrderInInfoListKw" })
async queryByFactoryCodeAndWorkAreaCode(content: any) {
let res = await http.post(
"/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
content
);
return res;
}
}
export default getModule(AggregatingModule);

@ -4,7 +4,7 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.Summary_HandoverByOrder') }}</view>
<view class="title">{{ $t("message.Summary_HandoverByOrder") }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
@ -54,7 +54,10 @@
</u-form-item>
</u-col>
<u-col :span="6">
<u-form-item prop="password" :label="this.$t('message.Summary_Password')">
<u-form-item
prop="password"
:label="this.$t('message.Summary_Password')"
>
<u-input
type="password"
v-model="submitForm.password"
@ -69,14 +72,18 @@
<u-row>
<u-col :span="4">
<u-button type="warning" @click="onSelectAll">
{{ $t('message.po_SelectAll') }}
{{ $t("message.po_SelectAll") }}
</u-button>
</u-col>
<u-col :span="4">
<u-button type="primary" @click="onOk"> {{ $t('message.dn_Confirm') }} </u-button>
<u-button type="primary" @click="onOk">
{{ $t("message.dn_Confirm") }}
</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit"> {{ $t('message.po_Submit') }} </u-button>
<u-button type="success" @click="onSubmit">
{{ $t("message.po_Submit") }}
</u-button>
</u-col>
</u-row>
</view>
@ -85,24 +92,24 @@
</template>
<script lang="ts">
import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { orderHeaders } 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 { orderHeaders } 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 AggregatingOrder extends BasePage {
/**
* 表单引用
*/
@Ref('amountForm') readonly $amountForm!: VForm;
@Ref('submitForm') readonly $submitForm!: VForm;
@Ref("amountForm") readonly $amountForm!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
/**
* 页面Module
@ -123,28 +130,39 @@ export default class AggregatingOrder extends BasePage {
* 更改数量表单
*/
amountForm = {
amount: '',
amount: "",
};
/**
* 上传表单
*/
submitForm = {
receiver: '',
receiverName: '',
password: '',
receiver: "",
receiverName: "",
password: "",
};
amountFormRules: VFormRules<any> = {
amount: [{ required: true, message: this.$t('message.Summary_PleaseInputNumber') as string }],
amount: [
{
required: true,
message: this.$t("message.Summary_PleaseInputNumber") as string,
},
],
};
submitFormRules: VFormRules<any> = {
receiverName: [
{ required: true, message: this.$t('message.Summary_PleaseInputReceiver') as string },
{
required: true,
message: this.$t("message.Summary_PleaseInputReceiver") as string,
},
],
password: [
{ required: true, message: this.$t('message.Summary_PleaseInputPassword') as string },
{
required: true,
message: this.$t("message.Summary_PleaseInputPassword") as string,
},
],
};
@ -172,7 +190,7 @@ export default class AggregatingOrder extends BasePage {
* 接收人确认
*/
async onReceiverConfirm() {
console.log('this.submitForm', this.submitForm);
console.log("this.submitForm", this.submitForm);
const userInfo = await auth.getUserInfo({
loginName: this.submitForm.receiverName,
});
@ -188,7 +206,10 @@ export default class AggregatingOrder extends BasePage {
if (!valid) return;
const firstSelection = this.model.orderList.find((_) => _.checked);
if (firstSelection === undefined) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip7') as string });
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip7") as string,
});
} else {
//
const currentPickNum = parseFloat(this.amountForm.amount);
@ -197,15 +218,18 @@ export default class AggregatingOrder extends BasePage {
//
const totalMoAmount = parseFloat(firstSelection.totalMoAmount);
if (currentPickNum <= 0) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip2') as string });
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip2") as string,
});
return;
}
if (currentPickNum + totalHvAmount - totalMoAmount > 0.000001) {
uni.showModal({
title: 'Tip',
content: this.$t('message.Pi_tip11') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
title: "Tip",
content: this.$t("message.Pi_tip11") as string,
confirmText: this.$t("message.workArea_Confirm") as string,
cancelText: this.$t("message.Cancel") as string,
showCancel: true,
success: (res) => {
if (res.confirm) {
@ -233,36 +257,66 @@ export default class AggregatingOrder extends BasePage {
this.$submitForm.validate(async (valid) => {
if (valid) {
if (model.orderList.length === 0) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip4') as string });
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
});
} else {
await auth.checkPassword({
rfPwd: this.submitForm.password,
factoryCode: session.factoryCode as string,
loginName: this.submitForm.receiver,
});
let submit = false;
let selectsta = true;
model.orderList.forEach((item, index) => {
if (!item.checked) {
model.setOrderListItemHvAmount({ index, hvAmount: 0 });
} else if (item.hvAmount == null || item.hvAmount == 0) {
submit = true;
}
// await auth.checkPassword({
// rfPwd: this.submitForm.password,
// factoryCode: session.factoryCode as string,
// loginName: this.submitForm.receiver,
// });
// let submit = false;
// let selectsta = true;
// model.orderList.forEach((item, index) => {
// if (!item.checked) {
// model.setOrderListItemHvAmount({ index, hvAmount: 0 });
// } else if (item.hvAmount == null || item.hvAmount == 0) {
// submit = true;
// }
// if (item.checked) {
// selectsta = false;
// }
// });
// if (selectsta) {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.Pi_tip4') as string,
// });
// return;
// }
// if (submit) {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.Summary_PleaseInputNumber') as string,
// });
// return;
// }
let List: any = [];
let isTrue = true;
this.model.orderList.forEach((item: any) => {
if (item.checked) {
selectsta = false;
List.push(item);
}
});
if (selectsta) {
if (List.length == 0) {
uni.showToast({
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
icon: "none",
title: "请先选择要提交的物料" as string,
});
return;
}
if (submit) {
List.forEach((item: any) => {
if (item.hvAmount != item.amount) {
isTrue = false;
return;
}
});
if (isTrue != true) {
uni.showToast({
icon: 'none',
title: this.$t('message.Summary_PleaseInputNumber') as string,
icon: "none",
title: "请确保交接数量等于需求数量" as string,
});
return;
}
@ -270,32 +324,32 @@ export default class AggregatingOrder extends BasePage {
operatorPass: this.submitForm.receiver,
factoryCode: session.factoryCode,
loginName: session.loginName,
orderOutIdAmountList: model.orderList.map((item) => ({
orderOutIdAmountList: List.map((item: any) => ({
...pick(
[
'materialCode',
'amount',
'totalHvAmount',
'sapFactoryCode',
'sendSpot',
'materialDesc',
'mrpCode',
'unit',
'prdOrder',
'proType',
'wkposCode',
'hvAmount',
'orderOutId',
"materialCode",
"amount",
"totalHvAmount",
"sapFactoryCode",
"sendSpot",
"materialDesc",
"mrpCode",
"unit",
"prdOrder",
"proType",
"wkposCode",
"hvAmount",
"orderOutId",
],
item,
item
),
pickNum: item.totalMoAmount,
factoryCode: session.factoryCode,
})),
});
this.submitForm.receiver = '';
this.submitForm.receiverName = '';
this.submitForm.password = '';
this.submitForm.receiver = "";
this.submitForm.receiverName = "";
this.submitForm.password = "";
// this.toPage(this.page.raw.handover.aggregating.index);
setTimeout(() => {
uni.navigateBack({ delta: 2 });
@ -319,7 +373,9 @@ export default class AggregatingOrder extends BasePage {
* 解锁
*/
async unlock() {
const orderOutIdList = model.proOrderResultList.map((_: any) => _.orderOutId);
const orderOutIdList = model.proOrderResultList.map(
(_: any) => _.orderOutId
);
try {
await http.post(url.sumscan.unlock.list, {
factoryCode: session.factoryCode,
@ -328,8 +384,8 @@ export default class AggregatingOrder 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,
});
}
}
@ -338,7 +394,8 @@ export default class AggregatingOrder 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%;

@ -4,7 +4,7 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.Summary_Result') }}</view>
<view class="title">{{ $t("message.Summary_Result") }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
@ -23,18 +23,20 @@
<u-row>
<u-col :span="4">
<u-button type="primary" @click="onAggregate">
{{ $t('message.Pi_Summary') }}
{{ $t("message.Pi_Summary") }}
</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onOrder"> {{ $t('message.Pi_ByOrder') }} </u-button>
<u-button type="success" @click="onOrder">
{{ $t("message.Pi_ByOrder") }}
</u-button>
</u-col>
<!-- <u-col :span="3">-->
<!-- <u-button type="warning"> 辅料 </u-button>-->
<!-- </u-col>-->
<u-col :span="4">
<u-button type="error" @click="uni.navigateBack()">{{
$t('message.po_Return')
$t("message.po_Return")
}}</u-button>
</u-col>
</u-row>
@ -44,11 +46,11 @@
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { resultHeaders } from './config';
import { session } from '@/store/modules/session';
import { Component } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "./model";
import { resultHeaders } from "./config";
import { session } from "@/store/modules/session";
@Component
export default class AggregatingResult extends BasePage {
@ -66,7 +68,9 @@ export default class AggregatingResult extends BasePage {
* 汇总
*/
async onAggregate() {
const orderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
const orderOutIdList = this.model.proOrderResultList.map(
(_: any) => _.orderOutId
);
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
@ -80,7 +84,9 @@ export default class AggregatingResult extends BasePage {
* 按单
*/
async onOrder() {
const orderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
const orderOutIdList = this.model.proOrderResultList.map(
(_: any) => _.orderOutId
);
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
@ -97,7 +103,9 @@ export default class AggregatingResult extends BasePage {
* 辅料
*/
async onAccessory() {
const orderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
const orderOutIdList = this.model.proOrderResultList.map(
(_: any) => _.orderOutId
);
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
@ -111,7 +119,8 @@ export default class AggregatingResult extends BasePage {
<style lang="scss" scoped>
.page-receipt-detail {
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%;

@ -4,7 +4,7 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.Summary_SummaryAndHandover') }}</view>
<view class="title">{{ $t("message.Summary_SummaryAndHandover") }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
@ -54,7 +54,10 @@
</u-form-item>
</u-col>
<u-col :span="6">
<u-form-item prop="password" :label="this.$t('message.Summary_Password')">
<u-form-item
prop="password"
:label="this.$t('message.Summary_Password')"
>
<u-input
type="password"
v-model="submitForm.password"
@ -69,14 +72,18 @@
<u-row>
<u-col :span="4">
<u-button type="warning" @click="onSelectAll">
{{ $t('message.po_SelectAll') }}
{{ $t("message.po_SelectAll") }}
</u-button>
</u-col>
<u-col :span="4">
<u-button type="primary" @click="onOk"> {{ $t('message.dn_Confirm') }} </u-button>
<u-button type="primary" @click="onOk">
{{ $t("message.dn_Confirm") }}
</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit"> {{ $t('message.po_Submit') }} </u-button>
<u-button type="success" @click="onSubmit">
{{ $t("message.po_Submit") }}
</u-button>
</u-col>
</u-row>
</view>
@ -85,24 +92,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 AggregatingSummary extends BasePage {
/**
* 表单引用
*/
@Ref('amountForm') readonly $amountForm!: VForm;
@Ref('submitForm') readonly $submitForm!: VForm;
@Ref("amountForm") readonly $amountForm!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
/**
* 页面Module
@ -123,28 +130,39 @@ export default class AggregatingSummary extends BasePage {
* 更改数量表单
*/
amountForm = {
amount: '',
amount: "",
};
/**
* 上传表单
*/
submitForm = {
receiver: '',
receiverName: '',
password: '',
receiver: "",
receiverName: "",
password: "",
};
amountFormRules: VFormRules<any> = {
amount: [{ required: true, message: this.$t('message.Summary_PleaseInputNumber') as string }],
amount: [
{
required: true,
message: this.$t("message.Summary_PleaseInputNumber") as string,
},
],
};
submitFormRules: VFormRules<any> = {
receiver: [
{ required: true, message: this.$t('message.Summary_PleaseInputReceiver') as string },
{
required: true,
message: this.$t("message.Summary_PleaseInputReceiver") as string,
},
],
password: [
{ required: true, message: this.$t('message.Summary_PleaseInputPassword') as string },
{
required: true,
message: this.$t("message.Summary_PleaseInputPassword") as string,
},
],
};
@ -187,7 +205,10 @@ export default class AggregatingSummary extends BasePage {
if (!valid) return;
const firstSelection = this.model.aggregateList.find((_) => _.checked);
if (firstSelection === undefined) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip7') as string });
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip7") as string,
});
} else {
//
const currentPickNum = parseFloat(this.amountForm.amount);
@ -195,16 +216,22 @@ export default class AggregatingSummary extends BasePage {
const totalHvAmount = parseFloat(firstSelection.totalHvAmount);
//
const totalMoAmount = parseFloat(firstSelection.totalMoAmount);
if (currentPickNum <= 0 || currentPickNum.toString().split('.')[1].length > 3) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip2') as string });
return;
}
// if (
// currentPickNum <= 0 ||
// currentPickNum.toString().split(".")[1].length > 3
// ) {
// uni.showToast({
// icon: "none",
// title: this.$t("message.Pi_tip2") as string,
// });
// return;
// }
if (currentPickNum + totalHvAmount - totalMoAmount > 0.000001) {
uni.showModal({
title: 'Tip',
content: this.$t('message.Pi_tip11') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
title: "Tip",
content: this.$t("message.Pi_tip11") as string,
confirmText: this.$t("message.workArea_Confirm") as string,
cancelText: this.$t("message.Cancel") as string,
showCancel: true,
success: (res) => {
if (res.confirm) {
@ -232,36 +259,66 @@ export default class AggregatingSummary extends BasePage {
this.$submitForm.validate(async (valid) => {
if (valid) {
if (model.aggregateList.length === 0) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip4') as string });
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
});
} else {
await auth.checkPassword({
rfPwd: this.submitForm.password,
factoryCode: session.factoryCode as string,
loginName: this.submitForm.receiver,
});
let submit = false;
let selectsta = true;
model.aggregateList.forEach((item) => {
if (!item.checked) {
return;
} else if (item.hvAmount == null || item.hvAmount == 0) {
submit = true;
}
// await auth.checkPassword({
// rfPwd: this.submitForm.password,
// factoryCode: session.factoryCode as string,
// loginName: this.submitForm.receiver,
// });
// let submit = false;
// let selectsta = true;
// model.aggregateList.forEach((item) => {
// if (!item.checked) {
// return;
// } else if (item.hvAmount == null || item.hvAmount == 0) {
// submit = true;
// }
// if (item.checked) {
// selectsta = false;
// }
// });
// if (selectsta) {
// uni.showToast({
// icon: "none",
// title: this.$t("message.Pi_tip4") as string,
// });
// return;
// }
// if (submit) {
// uni.showToast({
// icon: "none",
// title: this.$t("message.Summary_PleaseInputNumber") as string,
// });
// return;
// }
let List: any = [];
let isTrue = true;
this.model.aggregateList.forEach((item: any) => {
if (item.checked) {
selectsta = false;
List.push(item);
}
});
if (selectsta) {
if (List.length == 0) {
uni.showToast({
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
icon: "none",
title: "请先选择要提交的物料" as string,
});
return;
}
if (submit) {
List.forEach((item: any) => {
if (item.hvAmount != item.amount) {
isTrue = false;
return;
}
});
if (isTrue != true) {
uni.showToast({
icon: 'none',
title: this.$t('message.Summary_PleaseInputNumber') as string,
icon: "none",
title: "请确保交接数量等于需求数量" as string,
});
return;
}
@ -269,32 +326,34 @@ export default class AggregatingSummary extends BasePage {
operatorPass: this.submitForm.receiver,
factoryCode: session.factoryCode as string,
loginName: session.loginName as string,
dataList: model.aggregateList.map((item) => ({
dataList: List.map((item: any) => ({
...pick(
[
'materialCode',
'sapFactoryCode',
'materialDesc',
'unit',
'prdMaterialDesc',
'wkposCode',
'mrpCode',
'sendSpot',
"materialCode",
"sapFactoryCode",
"materialDesc",
"unit",
"prdMaterialDesc",
"wkposCode",
"mrpCode",
"sendSpot",
],
item,
item
),
amount: String(item.amount),
hvAmount: item.hvAmount == null ? '0' : String(item.hvAmount),
serialNo: item.serialNo == null ? '' : item.serialNo,
hvAmount: item.hvAmount == null ? "0" : String(item.hvAmount),
serialNo: item.serialNo == null ? "" : item.serialNo,
totalMoAmount: String(item.totalMoAmount),
totalHvAmount: String(item.totalHvAmount),
prdMaterialDesc: String(item.prdMaterialCode),
})),
includeOrderOutIdList: model.proOrderResultList.map((item: any) => item.orderOutId),
includeOrderOutIdList: model.proOrderResultList.map(
(item: any) => item.orderOutId
),
});
this.submitForm.receiver = '';
this.submitForm.receiverName = '';
this.submitForm.password = '';
this.submitForm.receiver = "";
this.submitForm.receiverName = "";
this.submitForm.password = "";
this.isBusinessFinished = true;
// uni.navigateBack({ delta: 2 });
setTimeout(() => {
@ -320,7 +379,9 @@ export default class AggregatingSummary extends BasePage {
* 解锁
*/
async unlock() {
const orderOutIdList = model.proOrderResultList.map((_: any) => _.orderOutId);
const orderOutIdList = model.proOrderResultList.map(
(_: any) => _.orderOutId
);
try {
await http.post(url.sumscan.unlock.list, {
factoryCode: session.factoryCode,
@ -329,8 +390,8 @@ export default class AggregatingSummary 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,
});
}
}
@ -339,7 +400,8 @@ export default class AggregatingSummary 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%;

@ -5,18 +5,18 @@ import {
Mutation,
MutationAction,
VuexModule,
} from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { auth } from '@/store/modules/auth';
import { session } from '@/store/modules/session';
} from "vuex-module-decorators";
import store from "@/store";
import http from "@/utils/request";
import { url } from "@/utils/url";
import { auth } from "@/store/modules/auth";
import { session } from "@/store/modules/session";
@Module({
namespaced: true,
dynamic: true,
store,
name: 'raw.handover.feeding',
name: "raw.handover.feeding",
})
export class FeedingModule extends VuexModule {
/**
@ -91,7 +91,7 @@ export class FeedingModule extends VuexModule {
/**
*
*/
@Action({ commit: 'clearState' })
@Action({ commit: "clearState" })
async saveBlDetailUpload(params: any) {
await auth.checkPassword({
factoryCode: session.factoryCode as string,
@ -104,8 +104,8 @@ export class FeedingModule extends VuexModule {
...params,
});
uni.showToast({
icon: 'success',
title: 'success',
icon: "success",
title: "success",
});
}
@ -158,6 +158,15 @@ export class FeedingModule extends VuexModule {
}));
return { locationList };
}
@Action({ commit: "updateCheckedOrderInInfoListKw" })
async queryByFactoryCodeAndWorkAreaCode(content: any) {
let res = await http.post(
"/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
content
);
return res;
}
}
export default getModule(FeedingModule);

@ -1,11 +1,11 @@
/**
*
*/
import vm from '@/main';
import vm from "@/main";
export const headers = [
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
label: vm.$t("message.Pi_OrderNo"),
key: "prdOrder",
width: 550,
},
];
@ -15,56 +15,56 @@ export const headers = [
*/
export const resultHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
label: vm.$t("message.po_MaterielNo"),
key: "materialCode",
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
label: vm.$t("message.po_DemandQuantity"),
key: "amount",
},
{
label: vm.$t('message.Pi_CumulativePickingQuantity'),
key: 'totalMoAmount',
label: vm.$t("message.Pi_CumulativePickingQuantity"),
key: "totalMoAmount",
width: 300,
},
{
label: vm.$t('message.Pi_HandoverQuantity'),
key: 'totalHvAmount',
label: vm.$t("message.Pi_HandoverQuantity"),
key: "totalHvAmount",
},
{
label: vm.$t('message.Pi_factory'),
key: 'sapFactoryCode',
label: vm.$t("message.Pi_factory"),
key: "sapFactoryCode",
},
{
label: vm.$t('message.Pi_Station'),
key: 'sendSpot',
label: vm.$t("message.Pi_Station"),
key: "sendSpot",
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
label: vm.$t("message.po_MaterielDes"),
key: "materialDesc",
width: 350,
},
{
label: 'MRP',
key: 'mrpCode',
label: "MRP",
key: "mrpCode",
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
label: vm.$t("message.Pi_unit"),
key: "unit",
},
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
label: vm.$t("message.Pi_OrderNo"),
key: "prdOrder",
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'prdMaterialDesc',
label: vm.$t("message.Pi_FinishedProductModel"),
key: "prdMaterialDesc",
width: 300,
},
{
label: vm.$t('message.po_Location'),
key: 'wkposCode',
label: vm.$t("message.po_Location"),
key: "wkposCode",
},
];
@ -73,40 +73,40 @@ export const resultHeaders = [
*/
export const summaryHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
label: vm.$t("message.po_MaterielNo"),
key: "materialCode",
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
label: vm.$t("message.po_DemandQuantity"),
key: "amount",
},
{
label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: 'currentAmount',
label: vm.$t("message.Pi_CurrentPickingQuantity"),
key: "currentAmount",
width: 300,
},
{
label: vm.$t('message.Pi_PickedQuantity'),
key: 'totalMoAmount',
label: vm.$t("message.Pi_PickedQuantity"),
key: "totalMoAmount",
},
{
label: vm.$t('message.Pi_QuantityHandedOver'),
key: 'totalHvAmount',
label: vm.$t("message.Pi_QuantityHandedOver"),
key: "totalHvAmount",
},
{
label: vm.$t('message.po_Location'),
label: vm.$t("message.po_Location"),
// key: 'currentWkposCode',
key: 'wkposCode',
key: "wkposCode",
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
label: vm.$t("message.po_MaterielDes"),
key: "materialDesc",
width: 350,
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
label: vm.$t("message.Pi_unit"),
key: "unit",
},
// {
// label: '成品型号',
@ -128,56 +128,56 @@ export const summaryHeaders = [
*/
export const orderHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
label: vm.$t("message.po_MaterielNo"),
key: "materialCode",
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
label: vm.$t("message.po_DemandQuantity"),
key: "amount",
},
{
label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: 'currentAmount',
label: vm.$t("message.Pi_CurrentPickingQuantity"),
key: "currentAmount",
width: 300,
},
{
label: vm.$t('message.Pi_PickedQuantity'),
key: 'totalMoAmount',
label: vm.$t("message.Pi_PickedQuantity"),
key: "totalMoAmount",
},
{
label: vm.$t('message.Pi_QuantityHandedOver'),
key: 'totalHvAmount',
label: vm.$t("message.Pi_QuantityHandedOver"),
key: "totalHvAmount",
},
{
label: vm.$t('message.po_Location'),
label: vm.$t("message.po_Location"),
// key: 'currentWkposCode',
key: 'wkposCode',
key: "wkposCode",
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
label: vm.$t("message.po_MaterielDes"),
key: "materialDesc",
width: 350,
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
label: vm.$t("message.Pi_unit"),
key: "unit",
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'prdMaterialDesc',
label: vm.$t("message.Pi_FinishedProductModel"),
key: "prdMaterialDesc",
width: 300,
},
{
label: vm.$t('message.Pi_factory'),
key: 'sapFactoryCode',
label: vm.$t("message.Pi_factory"),
key: "sapFactoryCode",
},
{
label: vm.$t('message.Pi_Station'),
key: 'sendSpot',
label: vm.$t("message.Pi_Station"),
key: "sendSpot",
},
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
label: vm.$t("message.Pi_OrderNo"),
key: "prdOrder",
},
];

@ -10,23 +10,23 @@
<div class="content">
<div class="content-item">
<div class="item-left">{{ $t("message.po_MaterielNo") }}</div>
<div class="item-right">{{ this.material.materialCode }}</div>
<div class="item-right">{{ material.materialCode }}</div>
</div>
<div class="content-item">
<div class="item-left">{{ $t("message.po_MaterielDes") }}</div>
<div class="item-right">{{ this.material.materialDesc }}</div>
<div class="item-right">{{ material.materialDesc }}</div>
</div>
<div class="content-item">
<div class="item-left">{{ $t("message.po_DemandQuantity") }}</div>
<div class="item-right">{{ this.material.requestAmount }}</div>
<div class="item-right">{{ material.amount }}</div>
</div>
<div class="content-item">
<div class="item-left">{{ $t("message.po_ActualQuantity") }}</div>
<div class="item-right">{{ this.material.receiptAmount }}</div>
<div class="item-right">{{ material.currentAmount }}</div>
</div>
<div class="content-item">
<div class="item-left">{{ $t("message.po_Location") }}</div>
<div class="item-right">{{ this.material.location }}</div>
<div class="item-right">{{ material.location }}</div>
</div>
</div>
<div class="library">
@ -138,19 +138,19 @@ export default class RawReceiptDetail extends BasePage {
});
let ant: any = sessionStorage.getItem("mater");
this.material = JSON.parse(ant);
this.number = this.material.requestAmount;
console.log("this.material", this.material);
this.number = this.material.amount;
sessionStorage.removeItem("mater");
if (this.material.hasOwnProperty("wllist")) {
this.material.wllist.forEach((item: any) => {
if (this.material.hasOwnProperty("wlList")) {
this.material.wlList.forEach((item: any) => {
let arr: object = {
value: item.wlCode,
};
let obj: any = {
value: arr,
num: item.receiptAmount,
num: item.qty,
};
this.LocationList.push(obj as never);
console.log("this.LocationList", this.LocationList);
});
}
}
@ -178,32 +178,13 @@ export default class RawReceiptDetail extends BasePage {
});
return;
}
if (item.value.sendSpot == this.wlCode.sendSpot) {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.num);
});
num += parseFloat(this.number);
if (num > parseFloat(this.material.requestAmount)) {
uni.showToast({
icon: "none",
title: "实际数量不能大于需求数量",
});
return;
}
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
this.material.receiptAmount = num;
this.number = "";
return;
}
});
}
if (this.LocationList.length == 0) {
if (this.number > this.material.requestAmount) {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.num);
});
num += parseFloat(this.number);
if (num > parseFloat(this.material.amount)) {
uni.showToast({
icon: "none",
title: "实际数量不能大于需求数量",
@ -215,34 +196,48 @@ export default class RawReceiptDetail extends BasePage {
num: this.number,
};
this.LocationList.push(arr as never);
this.material.receiptAmount = this.number;
this.material.currentAmount = num;
this.number = "";
return;
}
if (this.LocationList.length == 0) {
if (this.number > this.material.amount) {
uni.showToast({
icon: "none",
title: "实际数量不能大于需求数量",
});
return;
}
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
this.material.currentAmount = this.number;
this.number = "";
return;
}
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
console.log("this.LocationList", this.LocationList);
}
bookTypeChange(e: any) {
this.wlCode = e.pickerName;
}
Reservoir() {
let wllist: Array<string> = [];
let requestAmountNum = 0;
let wlList: Array<string> = [];
let currentAmount = 0;
this.LocationList.forEach((item: any) => {
let objString = JSON.stringify(this.material);
let TEM = JSON.parse(objString);
TEM.wlCode = item.value.label;
TEM.receiptAmount = item.num;
wllist.push(TEM);
TEM.qty = item.num;
wlList.push(TEM);
let pras = parseInt(item.num);
requestAmountNum += pras;
currentAmount += pras;
});
console.log("wllist", wllist);
this.material.wllist = null;
this.material.wllist = wllist;
this.material.receiptAmount = requestAmountNum;
this.material.wlList = wlList;
this.material.currentAmount = currentAmount;
sessionStorage.setItem("material", JSON.stringify(this.material));
this.redirectTo(this.page.raw.handover.picking.order);
}

@ -242,6 +242,7 @@ export default class pickingDom extends BasePage {
orderOutIdList,
};
await this.model.queryProOrderResult(params);
sessionStorage.setItem("params", JSON.stringify(params) as any);
this.toPage(this.page.raw.handover.picking.result);
});
}

@ -146,18 +146,15 @@ export default class RawReceiptDetail extends BasePage {
* 表头
*/
headers = orderHeaders;
onLoad() {
this.model.queryLocationList();
}
// onReadyonLoad
onReady() {
this.$form.setRules(this.rules);
onShow() {
this.model.queryLocationList();
this.model.proOrderResultList.forEach((item: any) => {
item.currentAmount = 0;
});
let ant: any = JSON.parse(sessionStorage.getItem("material") as string);
let index: any = JSON.parse(sessionStorage.getItem("index") as string);
this.model.proOrderResultList[index] = ant;
console.log(this.model.proOrderResultList);
sessionStorage.removeItem("material");
sessionStorage.removeItem("index");
}
@ -199,37 +196,40 @@ export default class RawReceiptDetail extends BasePage {
* 上传
*/
async onUpload() {
// if (!this.model.hasProOrderResultCurrentAmount) {
// uni.showToast({
// icon: "none",
// title: this.$t("message.Pi_tip3") as string,
// });
// return;
// }
const dataList = this.model.proOrderResultUploadList;
if (dataList.length === 0) {
//
if (this.model.proOrderResultUploadList.length === 0) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
});
return;
}
await this.model.saveProOrderResultUpload(dataList);
// this.toPage(this.page.raw.handover.picking.index);
// uni.navigateBack({ delta: 2 });
// setTimeout(() => {
// uni.navigateBack({ delta: 2 });
// }, 2000);
// uni.showModal({
// title: this.$t('message.Pi_tip') as string,
// content: this.$t('message.Pi_tip5') as string,
// confirmText: this.$t('message.workArea_Confirm') as string,
// showCancel: false,
// success: () => {
// // uni.navigateBack({ delta: 2 });
// this.toPage(this.page.raw.handover.picking.index);
// },
// });
//
let checkData: any = [];
this.model.proOrderResultUploadList.forEach((item: any) => {
if (item.checked === true) {
checkData.push(item);
}
});
//
if (checkData.length == 0) {
uni.showToast({
icon: "none",
title: "请先选中要提交的数据" as string,
});
return;
}
//
checkData.forEach((item: any) => {
if (item.wlList == null || item.wlList.length == 0) {
uni.showToast({
icon: "none",
title: "请确保所选数据都已分配库位" as string,
});
return;
}
});
await this.model.saveProOrderResultUpload(checkData);
}
/**

@ -69,7 +69,7 @@ export default class RawReceiptDetail extends BasePage {
async onOrder() {
const list = this.model.proOrderResultList;
await this.model.lockProOrderResult(list);
this.toPage(this.page.raw.handover.picking.order);
this.toPage(this.page.raw.handover.picking.byorder);
}
/**
@ -88,7 +88,7 @@ export default class RawReceiptDetail extends BasePage {
if (this.model.aggregateList.length === 0) {
return;
}
this.toPage(this.page.raw.handover.picking.summary);
this.toPage(this.page.raw.handover.picking.bysummary);
}
}
</script>

@ -136,14 +136,16 @@ export default class RawReceiptDetail extends BasePage {
* 表头
*/
headers = summaryHeaders;
onLoad() {
onShow() {
this.model.queryLocationList();
}
// onReadyonLoad
onReady() {
this.$form.setRules(this.rules);
this.model.aggregateList.forEach((item: any) => {
item.currentAmount = 0;
});
let ant: any = JSON.parse(sessionStorage.getItem("material") as string);
let index: any = JSON.parse(sessionStorage.getItem("index") as string);
this.model.aggregateList[index] = ant;
sessionStorage.removeItem("material");
sessionStorage.removeItem("index");
}
appoint() {
let selectStatus = model.aggregateList.map((item) => {
@ -162,12 +164,12 @@ export default class RawReceiptDetail extends BasePage {
if (i > 1) {
uni.showToast({
icon: "none",
title: "只能选择一个DN单" as string,
title: "只能选择一条物料" as string,
});
} else if (i == 0) {
uni.showToast({
icon: "none",
title: "请选择一个DN单" as string,
title: "请选择一条物料" as string,
});
} else {
let mater: number = selectStatus.indexOf(true);
@ -183,38 +185,52 @@ export default class RawReceiptDetail extends BasePage {
* 上传
*/
async onUpload() {
if (!this.model.hasAggregateCurrentAmount) {
//
if (this.model.aggregateList.length === 0) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip7") as string,
title: this.$t("message.Pi_tip4") as string,
});
return;
}
const includeOrderOutIdList = this.model.proOrderResultList.map(
(_: any) => _.orderOutId
);
const dataList = this.model.aggregateUploadList;
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
dataList,
includeOrderOutIdList,
};
await this.model.saveAggregateUpload(params);
// uni.navigateBack({ delta: 2 });
setTimeout(() => {
uni.navigateBack({ delta: 2 });
}, 2000);
// this.toPage(this.page.raw.handover.picking.index);
// uni.showModal({
// title: this.$t('message.Pi_tip') as string,
// content: this.$t('message.Pi_tip5') as string,
// confirmText: this.$t('message.workArea_Confirm') as string,
// showCancel: false,
// success: () => {
// // uni.navigateBack({ delta: 2 });
// },
// });
const dataList: any = [];
//
this.model.aggregateList.forEach((item: any) => {
if (item.checked === true) {
dataList.push(item);
}
});
//
if (dataList.length == 0) {
uni.showToast({
icon: "none",
title: "请先选中要提交的数据" as string,
});
return;
}
//
let isTrue: boolean = true;
dataList.forEach((item: any) => {
if (item.wlList == null || item.wlList.length == 0) {
uni.showToast({
icon: "none",
title: "请确保所选数据都已分配库位" as string,
});
isTrue = false;
}
});
if (isTrue == true) {
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
dataList,
includeOrderOutIdList,
};
await this.model.saveAggregateUpload(params);
}
}
/**

@ -138,19 +138,19 @@ export default class RawReceiptDetail extends BasePage {
});
let ant: any = sessionStorage.getItem("mater");
this.material = JSON.parse(ant);
this.number = this.material.requestAmount;
console.log("this.material", this.material);
this.number = this.material.amount;
sessionStorage.removeItem("mater");
if (this.material.hasOwnProperty("wllist")) {
this.material.wllist.forEach((item: any) => {
if (this.material.hasOwnProperty("wlList")) {
this.material.wlList.forEach((item: any) => {
let arr: object = {
value: item.wlCode,
};
let obj: any = {
value: arr,
num: item.receiptAmount,
num: item.qty,
};
this.LocationList.push(obj as never);
console.log("this.LocationList", this.LocationList);
});
}
}
@ -178,70 +178,67 @@ export default class RawReceiptDetail extends BasePage {
});
return;
}
if (item.value.sendSpot == this.wlCode.sendSpot) {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.num);
});
num += parseFloat(this.number);
if (num > parseFloat(this.material.requestAmount)) {
uni.showToast({
icon: "none",
title: "实际数量不能大于需求数量",
});
return;
}
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
this.material.receiptAmount = num;
this.number = "";
return;
}
});
}
if (this.LocationList.length == 0) {
if (this.number > this.material.requestAmount) {
uni.showToast({
icon: "none",
title: "实际数量不能大于需求数量",
});
return;
}
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.num);
});
num += parseFloat(this.number);
// if (num > parseFloat(this.material.amount)) {
// uni.showToast({
// icon: "none",
// title: "",
// });
// return;
// }
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
this.material.receiptAmount = this.number;
this.material.currentAmount = num;
this.number = "";
return;
}
if (this.LocationList.length == 0) {
// if (this.number > this.material.amount) {
// uni.showToast({
// icon: "none",
// title: "",
// });
// return;
// }
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
this.material.currentAmount = this.number;
this.number = "";
return;
}
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
console.log("this.LocationList", this.LocationList);
}
bookTypeChange(e: any) {
this.wlCode = e.pickerName;
}
Reservoir() {
let wllist: Array<string> = [];
let wlList: Array<string> = [];
let requestAmountNum = 0;
this.LocationList.forEach((item: any) => {
let objString = JSON.stringify(this.material);
let TEM = JSON.parse(objString);
TEM.wlCode = item.value.label;
TEM.receiptAmount = item.num;
wllist.push(TEM);
TEM.qty = item.num;
wlList.push(TEM);
let pras = parseInt(item.num);
requestAmountNum += pras;
});
console.log("wllist", wllist);
this.material.wllist = null;
this.material.wllist = wllist;
console.log("wlList", wlList);
this.material.wlList = null;
this.material.wlList = wlList;
this.material.receiptAmount = requestAmountNum;
sessionStorage.setItem("material", JSON.stringify(this.material));
this.redirectTo(this.page.raw.handover.picking.summary);

@ -1,17 +1,33 @@
<template>
<view class="page-raw-returning">
<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">
<u-icon class="icon" name="arrow-left" @click="back" />
</view>
<view class="title">{{ $t('message.ReturnedMaterials') }}</view>
<view class="title">{{ $t("message.ReturnedMaterials") }}</view>
<view class="right"></view>
</view>
<u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="150rpx">
<u-form
class="form"
ref="form"
:model="form"
:error-type="['toast']"
label-width="150rpx"
>
<u-form-item :label="this.$t('message.Pi_Station')">
<u-input v-model="form.sendSpot" :placeholder="this.$t('message.po_PleaseInput')" />
<u-input
v-model="form.sendSpot"
:placeholder="this.$t('message.po_PleaseInput')"
/>
</u-form-item>
<u-form-item :required="true" :label="this.$t('message.Pi_OrderNo')" prop="prdOrder">
<u-form-item
:required="true"
:label="this.$t('message.Pi_OrderNo')"
prop="prdOrder"
>
<u-search
:placeholder="this.$t('message.po_PleaseInput')"
v-model="form.prdOrder"
@ -19,7 +35,11 @@
:show-action="false"
></u-search>
</u-form-item>
<u-form-item :required="true" :label="this.$t('message.Pi_materielNo')" prop="wlName">
<u-form-item
:required="true"
:label="this.$t('message.Pi_materielNo')"
prop="wlName"
>
<u-input
v-model="form.wlName"
type="select"
@ -34,13 +54,44 @@
@confirm="materialConfirm"
></u-select>
</u-form-item>
<u-form-item :label="this.$t('message.po_Location')">
<u-input v-model="form.wkposCode" :placeholder="this.$t('message.po_PleaseInput')" />
</u-form-item>
<view class="newly">
<u-form-item :label="this.$t('message.po_Location')" style="width: 50%">
<u-input
v-model="form.wkposCode"
:placeholder="this.$t('message.po_PleaseInput')"
/>
</u-form-item>
<u-form-item
:label="this.$t('message.product_Location')"
style="width: 50%; margin-top: 16rpx"
>
<!-- <u-input
v-model="form.wkposCode"
:placeholder="this.$t('message.po_PleaseInput')"
/> -->
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</u-form-item>
</view>
<u-row gutter="0">
<u-col :span="7">
<u-form-item :label="this.$t('message.Pi_factory')" prop="sapFactoryCode">
<u-input :disabled="true" v-model="model.orderInInfo.sapFactoryCode" placeholder="" />
<u-form-item
:label="this.$t('message.Pi_factory')"
prop="sapFactoryCode"
>
<u-input
:disabled="true"
v-model="model.orderInInfo.sapFactoryCode"
placeholder=""
/>
</u-form-item>
</u-col>
<u-col :span="5">
@ -58,7 +109,11 @@
</u-form-item>
</u-col>
</u-row>
<u-form-item :required="true" :label="this.$t('message.return_OperatorName')" prop="operator">
<u-form-item
:required="true"
:label="this.$t('message.return_OperatorName')"
prop="operator"
>
<u-input
v-model="operatorName"
@confirm="onOperatorConfirm"
@ -76,10 +131,14 @@
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="6">
<u-button type="primary" @click="onSubmit">{{ $t('message.po_Submit') }}</u-button>
<u-button type="primary" @click="onSubmit">{{
$t("message.po_Submit")
}}</u-button>
</u-col>
<u-col :span="6">
<u-button type="error" @click="back">{{ $t('message.po_Return') }}</u-button>
<u-button type="error" @click="back">{{
$t("message.po_Return")
}}</u-button>
</u-col>
</u-row>
</view>
@ -87,18 +146,23 @@
</template>
<script lang="ts">
import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import { VForm, VFormRules } from 'vue/types/form';
import { auth } from '@/store/modules/auth';
import model from './model';
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import { VForm, VFormRules } from "vue/types/form";
import { auth } from "@/store/modules/auth";
import model from "./model";
import jPicker from "@/components/J-Picker/jPicker.vue";
@Component
@Component({
components: {
jPicker,
},
})
export default class returningDom extends BasePage {
/**
* 表单引用
*/
@Ref('form') readonly $form!: VForm;
@Ref("form") readonly $form!: VForm;
/**
* 页面Module
@ -109,22 +173,24 @@ export default class returningDom extends BasePage {
* 表单数据
*/
form = {
sendSpot: '',
sendSpot: "",
prdOrder: null,
sapFactoryCode: null,
operator: '',
amount: '',
operator: "",
amount: "",
rfPwd: null,
wkposCode: '',
wkposCode: "",
// tlType: null, // 退code
// tlName: null, // 退name
materialCode: null, // code
wlName: '', // name
wlName: "", // name
};
wlCode: any = "";
Location: any = [];
/**
* 工位退料人名称
*/
operatorName = '';
operatorName = "";
/**
* 退料类型选择
*/
@ -135,12 +201,22 @@ export default class returningDom extends BasePage {
* 表单验证规则
*/
rules: VFormRules<any> = {
operator: [{ required: true, message: this.$t('message.return_Tip1') as string }],
prdOrder: [{ required: true, message: this.$t('message.Warehouse_Tip5') as string }],
wlName: [{ required: true, message: this.$t('message.Warehouse_Tip6') as string }],
amount: [{ required: true, message: this.$t('message.return_Tip3') as string }],
operator: [
{ required: true, message: this.$t("message.return_Tip1") as string },
],
prdOrder: [
{ required: true, message: this.$t("message.Warehouse_Tip5") as string },
],
wlName: [
{ required: true, message: this.$t("message.Warehouse_Tip6") as string },
],
amount: [
{ required: true, message: this.$t("message.return_Tip3") as string },
],
};
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
}
// onReadyonLoad
async onReady() {
this.$form.setRules(this.rules);
@ -150,8 +226,8 @@ export default class returningDom extends BasePage {
back() {
// this.form.sendSpot = '';
// this.form.wkposCode = '';
this.model.orderInInfo.sapFactoryCode = '';
this.operatorName = '';
this.model.orderInInfo.sapFactoryCode = "";
this.operatorName = "";
// this.form.rfPwd = null;
this.model.materielList.length = 0;
uni.navigateBack({ delta: 1 });
@ -167,7 +243,7 @@ export default class returningDom extends BasePage {
this.form.wkposCode = item.wkposCode;
}
});
console.log('this.form', this.form);
console.log("this.form", this.form);
}
/**
* 上传
@ -175,27 +251,28 @@ export default class returningDom extends BasePage {
onSubmit() {
if (this.form.amount > this.model.orderInInfo.amount) {
uni.showToast({
icon: 'none',
title: this.$t('message.return_Tip4') as string,
icon: "none",
title: this.$t("message.return_Tip4") as string,
});
} else {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
if (!this.model.orderInInfo.sapFactoryCode) {
uni.showToast({
icon: 'none',
title: this.$t('message.return_Tip2') as string,
icon: "none",
title: 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;
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 = [];
});
}
@ -210,8 +287,8 @@ export default class returningDom extends BasePage {
this.form.operator = loginName;
this.operatorName = userName;
} catch {
this.form.operator = '';
this.operatorName = '';
this.form.operator = "";
this.operatorName = "";
}
}
}
@ -219,7 +296,8 @@ export default class returningDom extends BasePage {
<style lang="scss" scoped>
.page-raw-returning {
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: 118rpx 30rpx 162rpx;
min-height: 100%;
@ -263,6 +341,9 @@ export default class returningDom extends BasePage {
padding: 30rpx 0;
line-height: 35rpx;
}
.newly {
display: flex;
}
}
.bottom-bar {

@ -187,60 +187,52 @@ export default class RawReceiptDetail extends BasePage {
* 提交
*/
async onSubmit() {
let selectStatus = model.orderInInfoList.map((item) => {
if (item.checked == true) {
return true;
} else {
return false;
//
if (this.model.orderInInfoList.length === 0) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
});
return;
}
//
let checkData: any = [];
this.model.orderInInfoList.forEach((item: any) => {
if (item.checked === true) {
checkData.push(item);
}
});
// let LocStatus = model.orderInInfoList.map((item) => {
// if (
// item.checked == true &&
// (item.location == null || item.location == "")
// ) {
// return true;
// } else {
// return false;
// }
// });
// if (LocStatus[0]) {
// uni.showToast({
// icon: "none",
// title: this.$t("message.Warehouse_Tip2") as string,
// });
// return;
// }
await this.model.submitOrderInEnter();
this.locationCode = "";
// setTimeout(() => {
// uni.navigateBack({ delta: 1 });
// }, 2000);
this.model.orderInInfo.carNo = "";
this.model.orderInInfo.bookingTime = "";
this.model.orderInInfo.supplyCode = "";
this.model.orderInInfo.poType = "";
this.model.orderInInfo.location = "";
this.model.queryOrderInInfo(this.dnNo);
// if (selectStatus[0]) {
// await this.model.submitOrderInEnter();
// this.locationCode = "";
// setTimeout(() => {
// uni.navigateBack({ delta: 1 });
// }, 2000);
// this.model.orderInInfo.carNo = "";
// this.model.orderInInfo.bookingTime = "";
// this.model.orderInInfo.supplyCode = "";
// this.model.orderInInfo.poType = "";
// this.model.orderInInfo.location = "";
// } else {
// uni.showToast({
// icon: "none",
// title: this.$t("message.product_Tip2") as string,
// });
// return;
// }
//
if(checkData.length == 0){
uni.showToast({
icon: "none",
title: '请先选中要提交的数据' as string,
});
return
}
//
let isTrue:boolean = true
checkData.forEach((item:any) => {
if(item.wllist == null || item.wllist.length == 0){
uni.showToast({
icon: "none",
title: '请确保所选数据都已分配库位' as string,
});
isTrue = false
return;
}
})
if(isTrue == true){
await this.model.submitOrderInEnter(checkData);
this.locationCode = "";
this.model.orderInInfo.carNo = "";
this.model.orderInInfo.bookingTime = "";
this.model.orderInInfo.supplyCode = "";
this.model.orderInInfo.poType = "";
this.model.orderInInfo.location = "";
this.model.queryOrderInInfo(this.dnNo);
await this.redirectTo(this.page.raw.ingoods.dnReceipt.detail);
}
}
}
</script>

@ -141,6 +141,7 @@ export default class RawReceiptDetail extends BasePage {
this.material = JSON.parse(ant);
this.number = this.material.requestAmount;
sessionStorage.removeItem("mater");
localStorage.removeItem("sendSpot");
if (this.material.hasOwnProperty("wllist")) {
this.material.wllist.forEach((item: any) => {
let arr: object = {
@ -178,38 +179,36 @@ export default class RawReceiptDetail extends BasePage {
});
return;
}
if (item.value.sendSpot == this.wlCode.sendSpot) {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.num);
});
num += parseFloat(this.number);
if (num > parseFloat(this.material.requestAmount)) {
uni.showToast({
icon: "none",
title: "实际数量不能大于需求数量",
});
return;
}
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
this.material.receiptAmount = num;
this.number = "";
return;
}
});
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.num);
});
num += parseFloat(this.number);
// if (num > parseFloat(this.material.requestAmount)) {
// uni.showToast({
// icon: "none",
// title: "",
// });
// return;
// }
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
this.material.receiptAmount = num;
this.number = "";
return;
}
if (this.LocationList.length == 0) {
if (this.number > this.material.requestAmount) {
uni.showToast({
icon: "none",
title: "实际数量不能大于需求数量",
});
return;
}
// if (this.number > this.material.requestAmount) {
// uni.showToast({
// icon: "none",
// title: "",
// });
// return;
// }
let arr: object = {
value: this.wlCode,
num: this.number,

@ -162,6 +162,7 @@ export default class dnReceiptDom extends BasePage {
JSON.stringify(this.form.documentNo) as any
);
this.toPage(this.page.raw.ingoods.dnReceipt.detail);
// this.toPage(this.page.raw.ingoods.dnReceipt.Receiving);
});
}
}
@ -226,8 +227,5 @@ export default class dnReceiptDom extends BasePage {
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.button-bar {
}
}
</style>

@ -157,6 +157,7 @@ export class ReceiptModule extends VuexModule {
// orderInInfoList.forEach((item: any) => {
// item.receiptAmount = item.requestAmount;
// });
localStorage.setItem("list", JSON.stringify(list) as any);
localStorage.setItem("sendSpot", JSON.stringify(list[0].sendSpot) as any);
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx };
}
@ -165,11 +166,11 @@ export class ReceiptModule extends VuexModule {
*
*/
@MutationAction
async submitOrderInEnter() {
const list = (this.state as any).orderInInfoList.map((item: any) => {
item.orderStatus = item.checked ? "2" : "1";
return item;
});
async submitOrderInEnter(list: any) {
// const list = (this.state as any).orderInInfoList.map((item: any) => {
// // item.orderStatus = item.checked ? "2" : "1";
// return item;
// });
const result: any = await http.post(url.material.DNorderin.enter, {
dnNo: this.dnNo,
factoryCode: session.factoryCode,

@ -90,6 +90,9 @@ export default class RawReceiptDetail extends BasePage {
let index: any = JSON.parse(sessionStorage.getItem("index") as string);
this.model.orderInInfoList[index] = ant;
console.log(this.model.orderInInfoList);
// this.$nextTick(() => {
// this.toPage(this.page.raw.ingoods.dnReturnGoods.detail);
// });
}
gohome() {
this.toPage(this.page.raw.ingoods.dnReturnGoods.index);

@ -157,7 +157,7 @@ export default class dnReturnGoodsDom extends BasePage {
});
return;
}
this.toPage(this.page.raw.ingoods.dnReturnGoods.detail);
this.toPage(this.page.raw.ingoods.dnReturnGoods.location);
});
}
}

@ -5,11 +5,11 @@ import {
Mutation,
MutationAction,
VuexModule,
} from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
} from "vuex-module-decorators";
import store from "@/store";
import http from "@/utils/request";
import { url } from "@/utils/url";
import { session } from "@/store/modules/session";
class OrderInInfo {
checked?: boolean;
@ -28,7 +28,7 @@ class OrderInInfo {
namespaced: true,
dynamic: true,
store,
name: 'raw.ingoods.dnReturnGoods',
name: "raw.ingoods.dnReturnGoods",
})
export class ReceiptModule extends VuexModule {
/**
@ -38,7 +38,7 @@ export class ReceiptModule extends VuexModule {
/**
*
*/
dnNo = '';
dnNo = "";
/**
*
*/
@ -140,12 +140,16 @@ export class ReceiptModule extends VuexModule {
loginName: session.loginName,
});
const orderInInfo = list[0] || {};
const orderInInfoList = list.filter((_: OrderInInfo) => _.userDefined10 === '1');
const orderInInfoListEx = list.filter((_: OrderInInfo) => _.userDefined10 === '0');
const orderInInfoList = list.filter(
(_: OrderInInfo) => _.userDefined10 === "1"
);
const orderInInfoListEx = list.filter(
(_: OrderInInfo) => _.userDefined10 === "0"
);
orderInInfoList.forEach((item: any) => {
item.returnAmount = item.requestAmount;
});
console.log('1111111', orderInInfoList);
console.log("1111111", orderInInfoList);
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx };
}
@ -154,11 +158,12 @@ export class ReceiptModule extends VuexModule {
*/
@MutationAction
async submitOrderInEnter() {
const list = (this.state as any).orderInInfoList.map((item: any) => {
item.orderStatus = item.checked ? '2' : '1';
item.requestAmount = item.checked ? item.y : '0';
return item;
});
// const list = (this.state as any).orderInInfoList.map((item: any) => {
// item.orderStatus = item.checked ? '2' : '1';
// item.requestAmount = item.checked ? item.y : '0';
// return item;
// });
const list = (this.state as any).orderInInfoList;
const result: any = await http.post(url.material.DNorderin.out, {
dnNo: this.dnNo,
factoryCode: session.factoryCode,
@ -166,11 +171,12 @@ export class ReceiptModule extends VuexModule {
list,
});
uni.showToast({
icon: 'none',
icon: "none",
title: result.msg,
});
const orderInInfoList = result.list.sort(
(a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus),
(a: any, b: any) =>
Number(a.accountingStatus) - Number(b.accountingStatus)
);
return { orderInInfoList };
}
@ -178,9 +184,9 @@ export class ReceiptModule extends VuexModule {
/**
*
*/
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
@Action({ commit: "updateCheckedOrderInInfoListKw" })
async changeOrderInLocation(kw: string) {
await http.post('/material/orderin/enter', {
await http.post("/material/orderin/enter", {
warehouseCode: session.warehouseCode,
factoryCode: session.factoryCode,
loginName: session.loginName,
@ -188,6 +194,15 @@ export class ReceiptModule extends VuexModule {
});
return kw;
}
@Action({ commit: "updateCheckedOrderInInfoListKw" })
async queryByFactoryCodeAndWorkAreaCode(content: any) {
let res = await http.post(
"/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
content
);
return res;
}
}
export default getModule(ReceiptModule);

@ -4,7 +4,7 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.rawMenu_ReceivingGoods') }}</view>
<view class="title">{{ $t("message.rawMenu_ReceivingGoods") }}</view>
<view class="right"></view>
</view>
<view class="container">
@ -20,13 +20,15 @@
<u-icon size="80" :name="item.iconClass"></u-icon>
<text class="name">
{{
session.lang == 'en'
? index + 1 + ' ' + item.engResourceName
: index + 1 + ' ' + item.resourceName
session.lang == "en"
? index + 1 + " " + item.engResourceName
: index + 1 + " " + item.resourceName
}}</text
>
</u-button>
</u-col>
<u-button @click="DNReceiving">DN</u-button>
<u-button @click="POReceiving">PO</u-button>
<!-- <u-col :span="12">
<u-button @click="toPage(page.raw.ingoods.poReceipt.index)">
<u-icon size="80" name="/static/icons/icon-14.png"></u-icon>
@ -45,14 +47,20 @@
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import { Component } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
@Component
export default class RawAppointment extends BasePage {
childData: any;
onLoad(option: { childData: any }) {
this.childData = JSON.parse(option.childData);
}
DNReceiving() {
this.toPage(this.page.raw.ingoods.dnReceipt.dnReceiving);
}
POReceiving() {
this.toPage(this.page.raw.ingoods.poReceipt.poReceiving);
}
}
</script>

@ -134,23 +134,29 @@ export default class RawReceiptDetail extends BasePage {
* 实际数量
*/
number = "";
//PO
poNo = "";
/**
* 逐条修改
*/
// onReadyonLoad
onReady() {
//
onShow() {
this.model.queryLocation();
let ant: any = JSON.parse(sessionStorage.getItem("material") as string);
let index: any = JSON.parse(sessionStorage.getItem("index") as string);
this.model.orderInInfoList[index] = ant;
console.log(this.model.orderInInfoList);
this.poNo = JSON.parse(sessionStorage.getItem("poNo") as string);
sessionStorage.removeItem("material");
sessionStorage.removeItem("index");
}
//
gohome() {
this.toPage(this.page.raw.ingoods.poReceipt.index);
sessionStorage.removeItem("material");
sessionStorage.removeItem("index");
sessionStorage.removeItem("poNo");
}
bookTypeChange(e: any) {
this.locationCode = e.pickerName.value;
@ -184,6 +190,7 @@ export default class RawReceiptDetail extends BasePage {
}
});
}
//
appoint() {
let selectStatus = model.orderInInfoList.map((item) => {
if (item.checked == true) {
@ -222,47 +229,53 @@ export default class RawReceiptDetail extends BasePage {
* 提交
*/
async onSubmit() {
// let selectStatus = false;
// let LocStatus = false;
// model.orderInInfoList.forEach((item) => {
// if (item.checked == true) {
// selectStatus = true;
// }
// if (
// item.checked == true &&
// (item.location == null || item.location == "")
// ) {
// LocStatus = true;
// }
// });
// if (LocStatus) {
// uni.showToast({
// icon: "none",
// title: this.$t("message.Warehouse_Tip2") as string,
// });
// return;
// }
await this.model.submitOrderInEnter();
this.locationCode = "";
this.model.orderInInfo.supplyCode = "";
this.model.orderInInfo.poType = "";
this.model.orderInInfo.location = "";
// if (selectStatus) {
// await this.model.submitOrderInEnter();
// this.locationCode = "";
// setTimeout(() => {
// uni.navigateBack({ delta: 1 });
// }, 2000); //,
// this.model.orderInInfo.supplyCode = "";
// this.model.orderInInfo.poType = "";
// this.model.orderInInfo.location = "";
// } else {
// uni.showToast({
// icon: "none",
// title: this.$t("message.product_Tip2") as string,
// });
// return;
// }
//
if (this.model.orderInInfoList.length === 0) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
});
return;
}
//
let checkData: any = [];
this.model.orderInInfoList.forEach((item: any) => {
if (item.checked === true) {
checkData.push(item);
}
});
//
if(checkData.length == 0){
uni.showToast({
icon: "none",
title: '请先选中要提交的数据' as string,
});
return
}
//
let isTrue:boolean = true
checkData.forEach((item:any) => {
if(item.wllist == null || item.wllist.length == 0){
uni.showToast({
icon: "none",
title: '请确保所选数据都已分配库位' as string,
});
isTrue = false
return;
}
})
if(isTrue == true){
await this.model.submitOrderInEnter(checkData);
this.locationCode = "";
this.model.orderInInfo.supplyCode = "";
this.model.orderInInfo.poType = "";
this.model.orderInInfo.location = "";
this.model.queryOrderInInfo(this.poNo);
await this.redirectTo(this.page.raw.ingoods.poReceipt.detail);
}
// setTimeout(() => {
// uni.navigateBack({ delta: 1 });
// }, 2000);
}
}
</script>

@ -71,7 +71,7 @@
$t("message.product_Confirm")
}}</u-button>
<u-col :span="2" v-if="factoryCode == '6662'">
{ {$t('message.product_Location')}}
{{ $t("message.product_Location") }}
</u-col>
</u-row>
</div>
@ -110,7 +110,7 @@ export default class RawReceiptDetail extends BasePage {
wlCode: any = "";
material = <any>{};
list: any = [];
LocationList = [];
LocationList: any = [];
documentNo = "";
/**
* 表头
@ -139,7 +139,21 @@ export default class RawReceiptDetail extends BasePage {
});
let ant: any = sessionStorage.getItem("mater");
this.material = JSON.parse(ant);
this.number = this.material.requestAmount;
sessionStorage.removeItem("mater");
localStorage.removeItem("sendSpot");
if (this.material.hasOwnProperty("wllist")) {
this.material.wllist.forEach((item: any) => {
let arr: object = {
value: item.wlCode,
};
let obj: any = {
value: arr,
num: item.receiptAmount,
};
this.LocationList.push(obj as never);
});
}
}
confirm() {
if (this.wlCode == "" || this.number == "") {
@ -149,6 +163,13 @@ export default class RawReceiptDetail extends BasePage {
});
return;
}
if (parseFloat(this.number) <= 0) {
uni.showToast({
icon: "none",
title: "请输入正确的库位和数量",
});
return;
}
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (item.value.sendSpot != this.wlCode.sendSpot) {
@ -157,22 +178,45 @@ export default class RawReceiptDetail extends BasePage {
title: "请重新选择库位",
});
return;
} else {
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
return;
}
});
}
if (this.LocationList.length == 0) {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.num);
});
num += parseFloat(this.number);
// if (num > parseFloat(this.material.requestAmount)) {
// uni.showToast({
// icon: "none",
// title: "",
// });
// return;
// }
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
this.material.receiptAmount = num;
this.number = "";
return;
}
if (this.LocationList.length == 0) {
// if (this.number > this.material.requestAmount) {
// uni.showToast({
// icon: "none",
// title: "",
// });
// return;
// }
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
this.material.receiptAmount = this.number;
this.number = "";
return;
}
}
deleteItem(index: any) {
@ -193,10 +237,11 @@ export default class RawReceiptDetail extends BasePage {
let pras = parseInt(item.num);
requestAmountNum += pras;
});
this.material.wllist = null;
this.material.wllist = wllist;
this.material.receiptAmount = requestAmountNum;
sessionStorage.setItem("material", JSON.stringify(this.material));
this.toPage(this.page.raw.ingoods.poReceipt.detail);
this.redirectTo(this.page.raw.ingoods.poReceipt.detail);
}
}
</script>

@ -160,6 +160,10 @@ export default class poReceiptDom extends BasePage {
// });
// return;
// }
sessionStorage.setItem(
"poNo",
JSON.stringify(this.form.documentNo) as any
);
this.toPage(this.page.raw.ingoods.poReceipt.detail);
});
}

@ -150,6 +150,7 @@ export class ReceiptModule extends VuexModule {
item.receiptAmount = item.requestAmount;
// item.receiptAmount = parseFloat(item.receiptAmount).toFixed(1);
});
localStorage.setItem("sendSpot", JSON.stringify(list[0].sendSpot) as any);
return { poNo, orderInInfo, orderInInfoList, orderInInfoListEx, code1 };
}
@ -157,12 +158,12 @@ export class ReceiptModule extends VuexModule {
*
*/
@MutationAction
async submitOrderInEnter() {
const list = (this.state as any).orderInInfoList.map((item: any) => {
item.orderStatus = item.checked ? "2" : "1";
item.requestAmount = item.checked ? item.y : "0";
return item;
});
async submitOrderInEnter(list:any) {
// const list = (this.state as any).orderInInfoList.map((item: any) => {
// item.orderStatus = item.checked ? "2" : "1";
// item.requestAmount = item.checked ? item.y : "0";
// return item;
// });
const result: any = await http.post(url.material.POorderin.enter, {
poNo: this.poNo,
factoryCode: session.factoryCode,

@ -1,13 +1,13 @@
import Vue from 'vue';
import Vuex, { createLogger } from 'vuex';
import createPersistedState from 'vuex-persistedstate';
import { config } from 'vuex-module-decorators';
import { createVueWait } from '@/utils/wait';
import configAxios from './plugins/axios';
import Vue from "vue";
import Vuex, { createLogger } from "vuex";
import createPersistedState from "vuex-persistedstate";
import { config } from "vuex-module-decorators";
import { createVueWait } from "@/utils/wait";
import configAxios from "./plugins/axios";
Vue.use(Vuex);
const debug = process.env.NODE_ENV !== 'production';
const debug = process.env.NODE_ENV !== "production";
// 全局设置 rawError = true省去 @Action({ rawError: true }) 配置
config.rawError = true;
@ -32,18 +32,18 @@ const plugins = [];
debug && plugins.push(createLogger());
plugins.push(createVueWait());
plugins.push(configAxios());
export const persistedKey = '__GWMS_APP_STATE_DATA__';
export const persistedKey = "__GWMS_APP_STATE_DATA__";
plugins.push(
createPersistedState({
key: persistedKey, // 状态保存到本地的 key
paths: ['session', 'server'], // 要持久化的状态在state里面取如果有嵌套可以 a.b.c
paths: ["session", "server"], // 要持久化的状态在state里面取如果有嵌套可以 a.b.c
storage: {
// 存储方式定义
getItem: (key) => uni.getStorageSync(key), // 获取
setItem: (key, value) => uni.setStorageSync(key, value), // 存储
removeItem: (key) => uni.removeStorageSync(key), // 删除
},
}),
})
);
export default new Vuex.Store({

@ -66,14 +66,17 @@ export const page = {
index: "/pages/raw/handover/picking/index",
result: "/pages/raw/handover/picking/result",
summary: "/pages/raw/handover/picking/summary",
bysummary: "/pages/raw/handover/picking/BySummary",
order: "/pages/raw/handover/picking/order",
idetailed: "/pages/raw/handover/picking/idetailed",
query: "/pages/raw/handover/picking/query",
total: "/pages/raw/handover/picking/total",
byorder: "/pages/raw/handover/picking/ByOrder",
},
feeding: {
index: "/pages/raw/handover/feeding/index",
detail: "/pages/raw/handover/feeding/detail",
Location: "/pages/raw/handover/feeding/Location",
},
returning: {
index: "/pages/raw/handover/returning/index",
@ -103,16 +106,21 @@ export const page = {
detail: "/pages/raw/ingoods/poReceipt/detail",
detailEx: "/pages/raw/ingoods/poReceipt/detail-ex",
idetailed: "/pages/raw/ingoods/poReceipt/idetailed",
poReceiving: "/pages/raw/ingoods/poReceipt/poReceiving",
bill: "/pages/raw/ingoods/poReceipt/bill",
},
dnReceipt: {
index: "/pages/raw/ingoods/dnReceipt/index",
detail: "/pages/raw/ingoods/dnReceipt/detail",
detailEx: "/pages/raw/ingoods/dnReceipt/detail-ex",
idetailed: "/pages/raw/ingoods/dnReceipt/idetailed",
dnReceiving: "/pages/raw/ingoods/dnReceipt/dnReceiving",
bill: "/pages/raw/ingoods/dnReceipt/bill",
},
dnReturnGoods: {
index: "/pages/raw/ingoods/dnReturnGoods/index",
detail: "/pages/raw/ingoods/dnReturnGoods/detail",
location: "/pages/raw/ingoods/dnReturnGoods/Location",
detailEx: "/pages/raw/ingoods/dnReturnGoods/detail-ex",
idetailed: "/pages/raw/ingoods/dnReturnGoods/idetailed",
},

Loading…
Cancel
Save