交接 问题修复

master
hou 4 years ago
parent 5a1850da5c
commit 0c005a94b9

@ -138,6 +138,7 @@ export default {
Pi_tip6: '本次拣配数量+拣配数量不允许大于需求数量',
Pi_tip8: '本次交接数量+交接数量不允许大于拣配数量',
Pi_tip9: '本次补料数量+已补数量不允许大于需求数量',
Pi_tip12: '本次交接数量必须等于已拣配数量',
JJSLBNWK: '交接数量不能为空',
Pi_tip7: '请选中要修改的行',
Pi_tip11: '交接数量大于拣配数量,将产生虚拟库存',
@ -150,6 +151,7 @@ export default {
Pi_PickedQuantity: '已拣配数量',
Pi_QuantityHandedOver: '已交接数量',
Pi_distribution: '分配',
successful: '查询成功',
//汇总交接
Summary_Query: '汇总查询',

@ -21,9 +21,11 @@ export default {
request_Tip9: 'Service Unavailable',
request_Tip10: 'Gateway timeout',
request_Tip11: 'HTTP version is not supported',
Pi_tip12: 'The current handover quantity must be equal to the picked quantity',
Inventory_query: 'Inventory query',
success: 'Success',
error: 'Error',
successful: 'query was successful',
operation: 'operation',
//服务器设置
ServerSetting: 'Server Setting',

@ -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',
},
];

@ -35,16 +35,8 @@
<!-- </u-row>
<u-row align="top"> -->
<u-col :span="12">
<u-form-item
label-width="120rpx"
:required="true"
:label="this.$t('message.Pi_factory')"
prop="sapFactoryCode"
>
<u-input
v-model="form.sapFactoryCode"
:placeholder="this.$t('message.po_PleaseInput')"
/>
<u-form-item label-width="120rpx" :required="true" :label="this.$t('message.Pi_factory')" prop="sapFactoryCode">
<u-input v-model="form.sapFactoryCode" :placeholder="this.$t('message.po_PleaseInput')" />
</u-form-item>
</u-col>
<u-col :span="6">
@ -122,27 +114,14 @@
</u-col> -->
<u-col :span="12">
<u-form-item label-width="120rpx" :label="this.$t('message.po_MaterielNo')">
<u-input
v-model="form.materialCodeList"
:placeholder="this.$t('message.po_PleaseInput')"
style="margin-left: 12px"
/>
<u-input v-model="form.materialCodeList" :placeholder="this.$t('message.po_PleaseInput')" style="margin-left: 12px" />
</u-form-item>
</u-col>
</u-row>
<u-row>
<u-col :span="12">
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="multiple"
show-left-and-right-border
:headers="headers"
:contents="model.proOrderList"
:show-vert-border="false"
></wyb-table>
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.proOrderList" :show-vert-border="false"></wyb-table>
</view>
</u-col>
</u-row>
@ -156,9 +135,7 @@
<u-button type="success" @click="onOk">{{ $t('message.dn_Confirm') }}</u-button>
</u-col>
<u-col :span="3">
<u-button type="error" @click="uni.navigateBack()">{{
$t('message.po_Return')
}}</u-button>
<u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
</u-col>
</u-row>
</view>
@ -300,6 +277,7 @@ export default class Aggregating extends BasePage {
orderNoList: orderNoList,
};
await this.model.queryProOrderResult(params);
model.param = params;
this.toPage(this.page.raw.handover.aggregating.result);
});
}

@ -1,27 +1,21 @@
import {
getModule,
Module,
Mutation,
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";
import { getModule, Module, Mutation, 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';
@Module({
namespaced: true,
dynamic: true,
store,
name: "raw.handover.aggregating",
name: 'raw.handover.aggregating',
})
export class AggregatingModule extends VuexModule {
/**
*
*/
proOrderList = [];
param: any;
/**
*
@ -116,13 +110,7 @@ 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);
@ -133,13 +121,7 @@ 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);
@ -159,13 +141,7 @@ 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);
@ -201,8 +177,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 };
@ -214,10 +190,12 @@ 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 };
}
@MutationAction
async queryProOrders() {
const { list: proOrderResultList }: any = await http.post(url.sumscan.query.ordoutlist, this.param);
return { proOrderResultList };
}
@ -227,14 +205,11 @@ 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 };
@ -258,14 +233,11 @@ 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 };
@ -279,8 +251,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',
});
}
@ -293,12 +265,9 @@ export class AggregatingModule extends VuexModule {
return http.post(url.sumscan.u.fllist, params);
}
@Action({ commit: "updateCheckedOrderInInfoListKw" })
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async queryByFactoryCodeAndWorkAreaCode(content: any) {
let res = await http.post(
"/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
content
);
let res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
return res;
}
}

@ -8,7 +8,7 @@
<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.orderList" :show-vert-border="false"></wyb-table>
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border enable-check="single" :headers="headers" :contents="model.orderList" :show-vert-border="false"></wyb-table>
</view>
<view class="bottom-bar">
<view class="extra">
@ -185,35 +185,46 @@ export default class AggregatingOrder extends BasePage {
const totalHvAmount = parseFloat(firstSelection.totalHvAmount);
//
const totalMoAmount = parseFloat(firstSelection.totalMoAmount);
if (currentPickNum <= 0) {
// if (currentPickNum <= 0) {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.Pi_tip2') as string,
// });
// return;
// }
if (currentPickNum != totalMoAmount) {
uni.showToast({
icon: 'none',
title: this.$t('message.Pi_tip2') as string,
title: this.$t('message.Pi_tip12') 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,
showCancel: true,
success: (res) => {
if (res.confirm) {
model.setOrderListItemHvAmount({
index: this.model.orderList.findIndex((_) => _.checked),
hvAmount: currentPickNum,
});
}
},
});
} else {
model.setOrderListItemHvAmount({
index: this.model.orderList.findIndex((_) => _.checked),
hvAmount: currentPickNum,
});
}
// 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,
// showCancel: true,
// success: (res) => {
// if (res.confirm) {
// model.setOrderListItemHvAmount({
// index: this.model.orderList.findIndex((_) => _.checked),
// hvAmount: currentPickNum,
// });
// }
// },
// });
// } else {
// model.setOrderListItemHvAmount({
// index: this.model.orderList.findIndex((_) => _.checked),
// hvAmount: currentPickNum,
// });
// }
}
});
}
@ -302,19 +313,21 @@ export default class AggregatingOrder extends BasePage {
this.submitForm.receiver = '';
this.submitForm.receiverName = '';
this.submitForm.password = '';
await this.model.queryProOrders();
this.toPage(this.page.raw.handover.aggregating.order);
// setTimeout(() => {
// uni.navigateBack({ delta: 2 });
// }, 2000);
// uni.navigateBack({ delta: 2 });
uni.showModal({
title: this.$t('message.Pi_tip') as string,
content: this.$t('message.Warehouse_Tip9') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
showCancel: false,
success: () => {
this.toPage(this.page.raw.handover.aggregating.index);
},
});
// uni.showModal({
// title: this.$t('message.Pi_tip') as string,
// content: this.$t('message.Warehouse_Tip9') as string,
// confirmText: this.$t('message.workArea_Confirm') as string,
// showCancel: false,
// success: () => {
// this.toPage(this.page.raw.handover.aggregating.index);
// },
// });
}
}
});

@ -8,7 +8,7 @@
<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.aggregateList" :show-vert-border="false"></wyb-table>
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border enable-check="single" :headers="headers" :contents="model.aggregateList" :show-vert-border="false"></wyb-table>
</view>
<view class="bottom-bar">
<view class="extra">
@ -194,28 +194,39 @@ export default class AggregatingSummary extends BasePage {
// });
// 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,
showCancel: true,
success: (res) => {
if (res.confirm) {
if (currentPickNum != totalMoAmount) {
uni.showToast({
icon: 'none',
title: this.$t('message.Pi_tip12') as string,
});
return;
}
model.setAggregateListItemHvAmount({
index: this.model.aggregateList.findIndex((_) => _.checked),
hvAmount: currentPickNum,
});
}
},
});
} else {
model.setAggregateListItemHvAmount({
index: this.model.aggregateList.findIndex((_) => _.checked),
hvAmount: currentPickNum,
});
}
// 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,
// showCancel: true,
// success: (res) => {
// if (res.confirm) {
// model.setAggregateListItemHvAmount({
// index: this.model.aggregateList.findIndex((_) => _.checked),
// hvAmount: currentPickNum,
// });
// }
// },
// });
// } else {
// model.setAggregateListItemHvAmount({
// index: this.model.aggregateList.findIndex((_) => _.checked),
// hvAmount: currentPickNum,
// });
// }
}
});
}
@ -314,19 +325,21 @@ export default class AggregatingSummary extends BasePage {
this.submitForm.receiverName = '';
this.submitForm.password = '';
this.isBusinessFinished = true;
await this.model.queryProOrders();
this.toPage(this.page.raw.handover.aggregating.summary);
// uni.navigateBack({ delta: 2 });
// setTimeout(() => {
// uni.navigateBack({ delta: 2 });
// }, 2000);
uni.showModal({
title: this.$t('message.Pi_tip') as string,
content: this.$t('message.Warehouse_Tip9') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
showCancel: false,
success: () => {
this.toPage(this.page.raw.handover.aggregating.index);
},
});
// uni.showModal({
// title: this.$t('message.Pi_tip') as string,
// content: this.$t('message.Warehouse_Tip9') as string,
// confirmText: this.$t('message.workArea_Confirm') as string,
// showCancel: false,
// success: () => {
// this.toPage(this.page.raw.handover.aggregating.index);
// },
// });
// uni.navigateBack({ delta: 1 });
// model.clearProOrderResultList();
}

@ -4,84 +4,51 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="index" />
</view>
<view class="title">{{ $t("message.Pi_ByOrderPicking") }}</view>
<view class="title">{{ $t('message.Pi_ByOrderPicking') }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="single"
show-left-and-right-border
:headers="headers"
:contents="model.proOrderResultList"
:show-vert-border="false"
@onCheck="handleRow"
></wyb-table>
<wyb-table class="table" ref="table" width="100%" enable-check="single" show-left-and-right-border :headers="headers" :contents="model.proOrderResultList" :show-vert-border="false" @onCheck="handleRow"></wyb-table>
</view>
<!-- 列表展示数据 -->
<view class="Exhibition">
<view class="Exhibition-left">
<view class="Exhibition-left-title"
>{{ $t("message.Pi_Station") }}:</view
>
<view class="Exhibition-left-title">{{ $t('message.Pi_Station') }}:</view>
<view class="Exhibition-left-data">{{ some.sendSpot }}</view>
</view>
<view class="Exhibition-right">
<view class="Exhibition-right-title"
>{{ $t("message.Pi_PickedQuantity") }}:</view
>
<view class="Exhibition-right-title">{{ $t('message.Pi_PickedQuantity') }}:</view>
<view class="Exhibition-right-data">{{ some.totalMoAmount }}</view>
</view>
</view>
<!-- 添加库位 -->
<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="wlCode"
class="search"
:options="Location"
/>
<view>{{ $t('message.CommissionedLocation') }}:</view>
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode" class="search" :options="Location" />
</view>
<view class="library-right">
<view class="library-right-title"
>{{ $t("message.CommissionedThisNumber") }}:</view
>
<u-input
v-model="qty"
:type="type"
:border="border"
:placeholder="$t('message.Summary_PleaseInputNumber')"
class="input"
/>
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}:</view>
<u-input v-model="qty" :type="type" :border="border" :placeholder="$t('message.Summary_PleaseInputNumber')" class="input" />
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add">{{
$t("message.product_add")
}}</u-button>
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
<u-th class="u-th">{{ $t('message.product_Location') }}</u-th>
<u-th class="u-th">{{ $t('message.product_Number') }}</u-th>
<u-th class="u-th">{{ $t('message.operation') }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<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)">
{{ $t("message.product_Delete") }}
{{ $t('message.product_Delete') }}
</div>
</u-td>
</u-tr>
@ -95,18 +62,16 @@
<div class="container">
<u-row>
<u-col :span="4">
<u-button type="primary" class="appoint" @click="bill">{{
$t("message.detailed")
}}</u-button>
<u-button type="primary" class="appoint" @click="bill">{{ $t('message.detailed') }}</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit">
{{ $t("message.po_Submit") }}
{{ $t('message.po_Submit') }}
</u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="index">
{{ $t("message.po_Return") }}
{{ $t('message.po_Return') }}
</u-button>
</u-col>
</u-row>
@ -116,14 +81,14 @@
</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 { session } from "@/store/modules/session";
import { VForm, VFormRules } from "vue/types/form";
import jPicker from "@/components/J-Picker/jPicker.vue";
import { pick } from "lodash/fp";
import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { orderHeaders } from './config';
import { session } from '@/store/modules/session';
import { VForm, VFormRules } from 'vue/types/form';
import jPicker from '@/components/J-Picker/jPicker.vue';
import { pick } from 'lodash/fp';
@Component({
components: {
jPicker,
@ -133,19 +98,19 @@ export default class RawReceiptDetail extends BasePage {
/**
* 表单引用
*/
@Ref("form") readonly $form!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
@Ref('form') readonly $form!: VForm;
@Ref('submitForm') readonly $submitForm!: VForm;
submitForm = {
receiver: "",
receiverName: "",
password: "",
receiver: '',
receiverName: '',
password: '',
};
/**
* 页面Module
*/
model = model;
type = "text";
wlCode: any = "";
type = 'text';
wlCode: any = '';
border = true;
//
LocationList: any = [];
@ -153,7 +118,7 @@ export default class RawReceiptDetail extends BasePage {
Location: any = [];
someIndex: number = 0;
some: any = {};
qty: any = "";
qty: any = '';
again: any;
/**
* 表单数据
@ -171,7 +136,7 @@ export default class RawReceiptDetail extends BasePage {
rules: VFormRules<any> = {
// locationCode: [{ required: true, message: '' }],
amount: [
{ required: true, message: this.$t("message.Pi_tip1") as string },
{ required: true, message: this.$t('message.Pi_tip1') as string },
// { type: 'integer', min: 1, transform: Number, message: this.$t('message.Pi_tip2') as string },
],
};
@ -186,7 +151,7 @@ export default class RawReceiptDetail extends BasePage {
*/
headers = orderHeaders;
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e);
this.wlCode = e.pickerName;
}
handleRow({ data }: any) {
@ -195,27 +160,27 @@ export default class RawReceiptDetail extends BasePage {
this.model.proOrderResultList[this.someIndex].wlList = [];
this.model.proOrderResultList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = "";
this.qty = '';
}
Add() {
if (this.qty == "" || this.wlCode == "") {
if (this.qty == '' || this.wlCode == '') {
uni.showToast({
icon: "none",
title: this.$t("message.Commission_tips2") as any,
icon: 'none',
title: this.$t('message.Commission_tips2') as any,
});
return;
}
if (parseFloat(this.qty) <= 0) {
uni.showToast({
icon: "none",
title: this.$t("message.Commission_tips3") as any,
icon: 'none',
title: this.$t('message.Commission_tips3') as any,
});
return;
}
if (this.some == {}) {
uni.showToast({
icon: "none",
title: this.$t("message.Commission_tips6") as any,
icon: 'none',
title: this.$t('message.Commission_tips6') as any,
});
return;
}
@ -224,23 +189,20 @@ export default class RawReceiptDetail extends BasePage {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code || this.wlCode.label === item.wlCode) {
uni.showToast({
icon: "none",
title: this.$t("message.Commission_tips7") as any,
icon: 'none',
title: this.$t('message.Commission_tips7') as any,
});
return (isTrue = false);
}
});
}
if (isTrue == true) {
if (
parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) >
parseFloat(this.some.amount)
) {
if (parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) > parseFloat(this.some.amount)) {
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) {
@ -256,10 +218,8 @@ export default class RawReceiptDetail extends BasePage {
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[
this.someIndex
].currentAmount += parseFloat(this.qty);
this.qty = "";
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
}
},
});
@ -276,10 +236,8 @@ export default class RawReceiptDetail extends BasePage {
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[
this.someIndex
].currentAmount += parseFloat(this.qty);
this.qty = "";
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
}
}
}
@ -297,10 +255,8 @@ export default class RawReceiptDetail extends BasePage {
}
async onReady() {
//
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
@ -311,27 +267,25 @@ export default class RawReceiptDetail extends BasePage {
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
// this.model.proOrderResultList.forEach((item: any) => {
// item.hvAmount = 0;
// });
this.again = JSON.parse(sessionStorage.getItem("params") as any);
sessionStorage.removeItem("params");
this.again = JSON.parse(sessionStorage.getItem('params') as any);
sessionStorage.removeItem('params');
}
async bill() {
if (this.some == {} || this.some.prdOrder == null) {
uni.showToast({
icon: "none",
title: this.$t("message.Commission_tips6") as any,
icon: 'none',
title: this.$t('message.Commission_tips6') as any,
});
return;
}
let person = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let content = {
loginName: person.session.user.loginName,
prdOrder: this.some.prdOrder,
@ -351,7 +305,9 @@ export default class RawReceiptDetail extends BasePage {
});
await this.model.saveProOrderResultUpload(dataList).then(() => {
this.model.queryProOrderResult(this.again).then(() => {
this.toPage(this.page.raw.handover.picking.result);
// this.toPage(this.page.raw.handover.picking.result);
this.model.queryAggregate();
this.toPage(this.page.raw.handover.picking.byorder);
});
});
}
@ -360,8 +316,7 @@ export default class RawReceiptDetail extends BasePage {
<style lang="scss" scoped>
.page-picking-order {
background: #f2f2f2
linear-gradient(0deg, #eee7e7 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background: #f2f2f2 linear-gradient(0deg, #eee7e7 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;

@ -4,84 +4,51 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="index" />
</view>
<view class="title">{{ $t("message.Pi_SummaryPicking") }}</view>
<view class="title">{{ $t('message.Pi_SummaryPicking') }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="single"
show-left-and-right-border
:headers="headers"
:contents="model.aggregateList"
:show-vert-border="false"
@onCheck="handleRow"
></wyb-table>
<wyb-table class="table" ref="table" width="100%" enable-check="single" show-left-and-right-border :headers="headers" :contents="model.aggregateList" :show-vert-border="false" @onCheck="handleRow"></wyb-table>
</view>
<!-- 列表展示数据 -->
<view class="Exhibition">
<view class="Exhibition-left">
<view class="Exhibition-left-title"
>{{ $t("message.Pi_Station") }}:</view
>
<view class="Exhibition-left-title">{{ $t('message.Pi_Station') }}:</view>
<view class="Exhibition-left-data">{{ some.sendSpot }}</view>
</view>
<view class="Exhibition-right">
<view class="Exhibition-right-title"
>{{ $t("message.Pi_PickedQuantity") }}:</view
>
<view class="Exhibition-right-title">{{ $t('message.Pi_PickedQuantity') }}:</view>
<view class="Exhibition-right-data">{{ some.totalMoAmount }}</view>
</view>
</view>
<!-- 添加库位 -->
<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="wlCode"
class="search"
:options="Location"
/>
<view>{{ $t('message.CommissionedLocation') }}:</view>
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode" class="search" :options="Location" />
</view>
<view class="library-right">
<view class="library-right-title"
>{{ $t("message.CommissionedThisNumber") }}:</view
>
<u-input
v-model="qty"
:type="type"
:border="border"
:placeholder="$t('message.Summary_PleaseInputNumber')"
class="input"
/>
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}:</view>
<u-input v-model="qty" :type="type" :border="border" :placeholder="$t('message.Summary_PleaseInputNumber')" class="input" />
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add">{{
$t("message.product_add")
}}</u-button>
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
<u-th class="u-th">{{ $t('message.product_Location') }}</u-th>
<u-th class="u-th">{{ $t('message.product_Number') }}</u-th>
<u-th class="u-th">{{ $t('message.operation') }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<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)">
{{ $t("message.product_Delete") }}
{{ $t('message.product_Delete') }}
</div>
</u-td>
</u-tr>
@ -95,18 +62,16 @@
<div class="container">
<u-row>
<u-col :span="4">
<u-button type="primary" class="appoint" @click="bill">{{
$t("message.detailed")
}}</u-button>
<u-button type="primary" class="appoint" @click="bill">{{ $t('message.detailed') }}</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit">
{{ $t("message.po_Submit") }}
{{ $t('message.po_Submit') }}
</u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="index">
{{ $t("message.po_Return") }}
{{ $t('message.po_Return') }}
</u-button>
</u-col>
</u-row>
@ -116,14 +81,14 @@
</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 { session } from "@/store/modules/session";
import { VForm, VFormRules } from "vue/types/form";
import jPicker from "@/components/J-Picker/jPicker.vue";
import { pick } from "lodash/fp";
import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { summaryHeaders } from './config';
import { session } from '@/store/modules/session';
import { VForm, VFormRules } from 'vue/types/form';
import jPicker from '@/components/J-Picker/jPicker.vue';
import { pick } from 'lodash/fp';
@Component({
components: {
jPicker,
@ -133,19 +98,19 @@ export default class RawReceiptDetail extends BasePage {
/**
* 表单引用
*/
@Ref("form") readonly $form!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
@Ref('form') readonly $form!: VForm;
@Ref('submitForm') readonly $submitForm!: VForm;
submitForm = {
receiver: "",
receiverName: "",
password: "",
receiver: '',
receiverName: '',
password: '',
};
/**
* 页面Module
*/
model = model;
type = "text";
wlCode: any = "";
type = 'text';
wlCode: any = '';
border = true;
//
LocationList: any = [];
@ -153,7 +118,7 @@ export default class RawReceiptDetail extends BasePage {
Location: any = [];
someIndex: number = 0;
some: any = {};
qty: any = "";
qty: any = '';
again: any;
/**
* 表单数据
@ -171,7 +136,7 @@ export default class RawReceiptDetail extends BasePage {
rules: VFormRules<any> = {
// locationCode: [{ required: true, message: '' }],
amount: [
{ required: true, message: this.$t("message.Pi_tip1") as string },
{ required: true, message: this.$t('message.Pi_tip1') as string },
// { type: 'integer', min: 1, transform: Number, message: this.$t('message.Pi_tip2') as string },
],
};
@ -187,7 +152,7 @@ export default class RawReceiptDetail extends BasePage {
headers = summaryHeaders;
//
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e);
this.wlCode = e.pickerName;
}
//
@ -197,29 +162,29 @@ export default class RawReceiptDetail extends BasePage {
this.model.aggregateList[this.someIndex].wlList = [];
this.model.aggregateList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = "";
this.qty = '';
}
//
Add() {
if (this.qty == "" || this.wlCode == "") {
if (this.qty == '' || this.wlCode == '') {
uni.showToast({
icon: "none",
title: this.$t("message.Commission_tips2") as any,
icon: 'none',
title: this.$t('message.Commission_tips2') as any,
});
return;
}
if (parseFloat(this.qty) <= 0) {
uni.showToast({
icon: "none",
title: this.$t("message.Commission_tips3") as any,
icon: 'none',
title: this.$t('message.Commission_tips3') as any,
});
return;
}
//guoshuang
if (JSON.stringify(this.some) == "{}") {
if (JSON.stringify(this.some) == '{}') {
uni.showToast({
icon: "none",
title: this.$t("message.Commission_tips6") as any,
icon: 'none',
title: this.$t('message.Commission_tips6') as any,
});
return;
}
@ -228,23 +193,20 @@ export default class RawReceiptDetail extends BasePage {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code) {
uni.showToast({
icon: "none",
title: this.$t("message.Commission_tips7") as any,
icon: 'none',
title: this.$t('message.Commission_tips7') as any,
});
return (isTrue = false);
}
});
}
if (isTrue == true) {
if (
parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) >
parseFloat(this.some.amount)
) {
if (parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) > parseFloat(this.some.amount)) {
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) {
@ -260,10 +222,8 @@ export default class RawReceiptDetail extends BasePage {
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[
this.someIndex
].currentAmount += parseFloat(this.qty);
this.qty = "";
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
}
},
});
@ -280,10 +240,8 @@ export default class RawReceiptDetail extends BasePage {
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(
this.qty
);
this.qty = "";
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
}
}
}
@ -303,10 +261,8 @@ export default class RawReceiptDetail extends BasePage {
}
//
async onReady() {
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
@ -317,15 +273,15 @@ export default class RawReceiptDetail extends BasePage {
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
// this.model.aggregateList.forEach((item: any) => {
// item.hvAmount = 0;
// });
this.again = JSON.parse(sessionStorage.getItem("params") as any);
sessionStorage.removeItem("params");
this.again = JSON.parse(sessionStorage.getItem('params') as any);
sessionStorage.removeItem('params');
}
async bill() {
// if (this.some == {} || this.some.prdOrder == null) {
@ -347,9 +303,7 @@ export default class RawReceiptDetail extends BasePage {
}
//
async onSubmit() {
const includeOrderOutIdList = this.model.proOrderResultList.map(
(_: any) => _.orderOutId
);
const includeOrderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
const dataList: any = [];
this.model.aggregateList.forEach((item: any) => {
if (item.checked == true) {
@ -364,7 +318,9 @@ export default class RawReceiptDetail extends BasePage {
};
await this.model.saveAggregateUpload(params).then(() => {
this.model.queryProOrderResult(this.again).then(() => {
this.toPage(this.page.raw.handover.picking.result);
// this.toPage(this.page.raw.handover.picking.result);
this.model.queryAggregate()
this.toPage(this.page.raw.handover.picking.bysummary);
});
});
}
@ -373,8 +329,7 @@ export default class RawReceiptDetail extends BasePage {
<style lang="scss" scoped>
.page-picking-order {
background: #f2f2f2
linear-gradient(0deg, #eee7e7 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background: #f2f2f2 linear-gradient(0deg, #eee7e7 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;

@ -1,70 +1,35 @@
<template>
<view class="page-raw-receipt">
<view
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="index" />
</view>
<view class="title">{{ $t("message.Pi_PickingQuery") }}</view>
<view class="title">{{ $t('message.Pi_PickingQuery') }}</view>
<view class="right"></view>
</view>
<u-form
class="form"
ref="form"
:model="form"
:error-type="['toast']"
label-width="120rpx"
>
<u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="120rpx">
<u-row align="top">
<u-col :span="12">
<!-- mMRP -->
<u-form-item :required="true" label="MRP" prop="mrpCodeRegion">
<u-input
v-model="form.mrpCodeRegion"
:placeholder="this.$t('message.po_PleaseInput')"
/>
<u-input v-model="form.mrpCodeRegion" :placeholder="this.$t('message.po_PleaseInput')" />
</u-form-item>
<!-- 订单号 -->
<u-form-item :label="this.$t('message.Pi_OrderNo')">
<u-input
v-model="form.prdOrderFrom"
:placeholder="this.$t('message.po_PleaseInput')"
/>
<u-input v-model="form.prdOrderFrom" :placeholder="this.$t('message.po_PleaseInput')" />
</u-form-item>
<!-- 工厂 -->
<u-form-item
:required="true"
:label="this.$t('message.Pi_factory')"
prop="sapFactoryCode"
>
<u-input
v-model="form.sapFactoryCode"
:placeholder="this.$t('message.po_PleaseInput')"
/>
<u-form-item :required="true" :label="this.$t('message.Pi_factory')" prop="sapFactoryCode">
<u-input v-model="form.sapFactoryCode" :placeholder="this.$t('message.po_PleaseInput')" />
</u-form-item>
<!-- 物料号 -->
<u-form-item :label="this.$t('message.Pi_materielNo')">
<u-input
v-model="form.materialCodeList"
style="padding-left: 14px"
:placeholder="this.$t('message.po_PleaseInput')"
/>
<u-input v-model="form.materialCodeList" style="padding-left: 14px" :placeholder="this.$t('message.po_PleaseInput')" />
</u-form-item>
</u-col>
<u-col :span="12">
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="multiple"
show-left-and-right-border
:headers="headers"
:contents="model.proOrderList"
:show-vert-border="false"
></wyb-table>
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.proOrderList" :show-vert-border="false"></wyb-table>
</view>
</u-col>
</u-row>
@ -72,19 +37,13 @@
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="6">
<u-button type="primary" @click="onQuery">{{
$t("message.Pi_order")
}}</u-button>
<u-button type="primary" @click="onQuery">{{ $t('message.Pi_order') }}</u-button>
</u-col>
<u-col :span="3">
<u-button type="success" @click="onOk">{{
$t("message.dn_Confirm")
}}</u-button>
<u-button type="success" @click="onOk">{{ $t('message.dn_Confirm') }}</u-button>
</u-col>
<u-col :span="3">
<u-button type="error" @click="index">{{
$t("message.po_Return")
}}</u-button>
<u-button type="error" @click="index">{{ $t('message.po_Return') }}</u-button>
</u-col>
</u-row>
</view>
@ -92,23 +51,23 @@
</template>
<script lang="ts">
import { Component, Ref, Watch } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import { VForm } from "vue/types/form";
import model from "./model";
import { headers } from "./config";
import http from "@/utils/request";
import { url } from "@/utils/url";
import { session } from "@/store/modules/session";
import { Component, Ref, Watch } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import { VForm } from 'vue/types/form';
import model from './model';
import { headers } from './config';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Component
export default class pickingDom extends BasePage {
/**
* 表单引用
*/
@Ref("form") readonly $form!: VForm;
@Ref('form') readonly $form!: VForm;
@Watch("form", { immediate: true, deep: true })
@Watch('form', { immediate: true, deep: true })
onPersonChanged() {
this.isFormChange = true;
}
@ -126,16 +85,16 @@ export default class pickingDom extends BasePage {
* 表单数据
*/
form = {
mrpCodeRegion: "",
mrpCodeIncludeList: "",
mrpCodeExcludeList: "",
prdOrderFrom: "",
prdOrderTo: "",
sapFactoryCode: "",
wkposCode: "",
batchNumberList: "",
materialCodeList: "",
sendSpotList: "",
mrpCodeRegion: '',
mrpCodeIncludeList: '',
mrpCodeExcludeList: '',
prdOrderFrom: '',
prdOrderTo: '',
sapFactoryCode: '',
wkposCode: '',
batchNumberList: '',
materialCodeList: '',
sendSpotList: '',
};
/**
@ -153,12 +112,8 @@ export default class pickingDom extends BasePage {
* 表单校验
*/
rules = {
mrpCodeRegion: [
{ required: true, message: this.$t("message.Pi_InputMrp") as string },
],
sapFactoryCode: [
{ required: true, message: this.$t("message.Pi_InputFactory") as string },
],
mrpCodeRegion: [{ required: true, message: this.$t('message.Pi_InputMrp') as string }],
sapFactoryCode: [{ required: true, message: this.$t('message.Pi_InputFactory') as string }],
};
/**
@ -171,27 +126,27 @@ export default class pickingDom extends BasePage {
loginName: session.loginName,
};
if (this.form.batchNumberList) {
params.batchNumberList = this.form.batchNumberList.split(",");
params.batchNumberList = this.form.batchNumberList.split(',');
} else {
delete params.batchNumberList;
}
if (this.form.materialCodeList) {
params.materialCodeList = this.form.materialCodeList.split(",");
params.materialCodeList = this.form.materialCodeList.split(',');
} else {
delete params.materialCodeList;
}
if (this.form.mrpCodeIncludeList) {
params.mrpCodeIncludeList = this.form.mrpCodeIncludeList.split(",");
params.mrpCodeIncludeList = this.form.mrpCodeIncludeList.split(',');
} else {
delete params.mrpCodeIncludeList;
}
if (this.form.mrpCodeExcludeList) {
params.mrpCodeExcludeList = this.form.mrpCodeExcludeList.split(",");
params.mrpCodeExcludeList = this.form.mrpCodeExcludeList.split(',');
} else {
delete params.mrpCodeExcludeList;
}
if (this.form.sendSpotList) {
params.sendSpotList = this.form.sendSpotList.split(",");
params.sendSpotList = this.form.sendSpotList.split(',');
} else {
delete params.sendSpotList;
}
@ -216,26 +171,21 @@ export default class pickingDom extends BasePage {
if (!valid) return;
let orderOutIdList = [];
if (this.isFormChange || this.model.proOrderList.length === 0) {
const { list: proOrderList }: any = await http.post(
url.sortscan.query.prdorder,
this.formParams
);
const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams);
orderOutIdList = proOrderList.map((_: any) => _.orderOutId);
} else {
orderOutIdList = this.model.checkedProOrderList.map(
(_: any) => _.orderOutId
);
orderOutIdList = this.model.checkedProOrderList.map((_: any) => _.orderOutId);
}
if (orderOutIdList.length === 0 && this.model.proOrderList.length > 0) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_OrderNoNotSelected") as string,
icon: 'none',
title: this.$t('message.Pi_OrderNoNotSelected') as string,
});
return;
} else if (orderOutIdList.length === 0) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_NoDataFound") as string,
icon: 'none',
title: this.$t('message.Pi_NoDataFound') as string,
});
return;
}
@ -246,7 +196,7 @@ export default class pickingDom extends BasePage {
orderOutIdList,
};
await this.model.queryProOrderResult(params);
sessionStorage.setItem("params", JSON.stringify(params) as any);
sessionStorage.setItem('factory', JSON.stringify(params) as any);
this.toPage(this.page.raw.handover.picking.result);
});
}
@ -260,6 +210,9 @@ export default class pickingDom extends BasePage {
await this.model.queryProOrder(this.formParams);
this.model.checkAllProOrderList(true);
this.isFormChange = false;
model.mrpCodeRegion = this.form.mrpCodeRegion as any;
model.sapFactoryCode = this.form.sapFactoryCode as any;
model.formParams = this.formParams;
});
}
}
@ -267,8 +220,7 @@ export default class pickingDom extends BasePage {
<style lang="scss" scoped>
.page-raw-receipt {
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%;

@ -1,21 +1,14 @@
import {
Action,
getModule,
Module,
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";
import { Action, getModule, Module, 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';
@Module({
namespaced: true,
dynamic: true,
store,
name: "raw.handover.picking",
name: 'raw.handover.picking',
})
export class PickingModule extends VuexModule {
/**
@ -23,6 +16,9 @@ export class PickingModule extends VuexModule {
*/
proOrderList: any[] = [];
detailedList: any;
mrpCodeRegion: '';
sapFactoryCode: '';
formParams: '';
/**
*
@ -186,10 +182,7 @@ export class PickingModule extends VuexModule {
* @param params
*/
@Mutation
confirmCheckedAggregateList(params: {
locationCode: string;
amount: number;
}) {
confirmCheckedAggregateList(params: { locationCode: string; amount: number }) {
this.aggregateList
.filter((_: any) => _.checked)
.forEach((item: any) => {
@ -238,14 +231,22 @@ export class PickingModule extends VuexModule {
*/
@MutationAction
async queryProOrder(params: any) {
const { list: proOrderList }: any = await http.post(
url.sortscan.query.prdorder,
params
);
const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, params);
if (!proOrderList.length) {
uni.showToast({
icon: "none",
title: "No Data Found",
icon: 'none',
title: 'No Data Found',
});
}
return { proOrderList };
}
@MutationAction
async queryOrder() {
const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams);
if (!proOrderList.length) {
uni.showToast({
icon: 'none',
title: 'No Data Found',
});
}
return { proOrderList };
@ -254,12 +255,9 @@ export class PickingModule extends VuexModule {
*
* @param params
*/
@Action({ commit: "updateCheckedOrderInInfoListKw" })
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async queryStockList(params: any) {
const res: any = await http.post(
"/material/queryOdsRawStorageNews",
params
);
const res: any = await http.post('/material/queryOdsRawStorageNews', params);
return res;
}
@ -269,10 +267,7 @@ export class PickingModule extends VuexModule {
*/
@MutationAction
async queryProOrderResult(params: any) {
const { list: proOrderResultList }: any = await http.post(
url.sortscan.query.prdorderList,
params
);
const { list: proOrderResultList }: any = await http.post(url.sortscan.query.prdorderList, params);
proOrderResultList.forEach((_: any) => (_.loginName = params.loginName));
return { proOrderResultList };
}
@ -283,14 +278,24 @@ export class PickingModule extends VuexModule {
*/
@MutationAction
async queryAggregateList(params: any) {
const { list: aggregateList }: any = await http.post(
url.sortscan.query.aggregateList,
params
);
const { list: aggregateList }: any = await http.post(url.sortscan.query.aggregateList, params);
if (!aggregateList.length) {
uni.showToast({
icon: "none",
title: "No Data Found",
icon: 'none',
title: 'No Data Found',
});
}
aggregateList.forEach((_: any) => (_.loginName = params.loginName));
return { aggregateList };
}
@MutationAction
async queryAggregate() {
let params = JSON.parse(sessionStorage.getItem('factory'));
const { list: aggregateList }: any = await http.post(url.sortscan.query.aggregateList, params);
if (!aggregateList.length) {
uni.showToast({
icon: 'none',
title: 'No Data Found',
});
}
aggregateList.forEach((_: any) => (_.loginName = params.loginName));
@ -317,12 +322,12 @@ export class PickingModule extends VuexModule {
/**
*
*/
@Action({ commit: "clearState" })
@Action({ commit: 'clearState' })
async saveAggregateUpload(params: any) {
await http.post(url.sortscan.save.aggregate, params);
uni.showToast({
icon: "success",
title: "success",
icon: 'success',
title: 'success',
});
// await this.unlockProOrderResult(params.dataList);
}
@ -330,12 +335,12 @@ export class PickingModule extends VuexModule {
/**
*
*/
@Action({ commit: "clearState" })
@Action({ commit: 'clearState' })
async saveProOrderResultUpload(dataList: any[]) {
await http.post(url.sortscan.save.order, dataList);
uni.showToast({
icon: "success",
title: "success",
icon: 'success',
title: 'success',
});
// await this.unlockProOrderResult(dataList);
}
@ -364,18 +369,15 @@ export class PickingModule extends VuexModule {
await http.post(url.sortscan.lock.list, list);
}
@Action({ commit: "updateCheckedOrderInInfoListKw" })
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async queryByFactoryCodeAndWorkAreaCode(content: any) {
let res = await http.post(
"/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
content
);
let res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
return res;
}
//查询拣配明细
@Action({ commit: "updateCheckedOrderInInfoListKw" })
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async querydetaildlist(content: any) {
let res: any = await http.post("/wmspda/sortscan/getJhListSn", content);
let res: any = await http.post('/wmspda/sortscan/getJhListSn', content);
this.detailedList = res.list;
console.log(this.detailedList);
return res;

@ -52,7 +52,6 @@ export default class returningDom extends BasePage {
endMobile = '';
materialList = [];
OddList: any = [];
<<<<<<< HEAD
data: any = {
label: '',
value: '',
@ -60,15 +59,6 @@ export default class returningDom extends BasePage {
sendSpot: '',
};
=======
data: any = {
label: '',
value: '',
amount: '',
sendSpot: '',
};
>>>>>>> 9bcbb18... 退料 筛选后选择一条数据带回上一页面并初始化赋值
startParams = {
year: true,
month: true,
@ -93,17 +83,12 @@ export default class returningDom extends BasePage {
this.endMobile = endParams.year + '-' + endParams.month + '-' + endParams.day;
}
onCheck(e: any) {
<<<<<<< HEAD
// 退 退
console.log('eeeee', e.data[0].lineData);
this.data.label = e.data[0].lineData.label;
this.data.value = e.data[0].lineData.value;
this.data.sendSpot = e.data[0].lineData.sendSpot;
this.data.amount = e.data[0].lineData.amount;
=======
console.log('eeeee', e.data[0].lineData);
this.data = e.data[0].lineData;
>>>>>>> 9bcbb18... 退料 筛选后选择一条数据带回上一页面并初始化赋值
}
back() {
if (this.data.label == '' || this.data.label == null) {

@ -77,9 +77,7 @@
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.receiptAmount }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t('message.product_Delete') }}
</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>
@ -147,9 +145,7 @@ export default class dnReceiptDom extends BasePage {
//
upload: any = [];
//
async onReady() {
}
async onReady() {}
//
//
async initLocation() {
@ -183,6 +179,12 @@ export default class dnReceiptDom extends BasePage {
//
this.initLocation();
await this.model.ImportQueryOrderInfo(this.form.documentNo);
if (model.code == '1') {
uni.showToast({
icon: 'none',
title: this.$t('message.successful') as any,
});
}
let list: any = localStorage.getItem('list');
localStorage.removeItem('list');
this.material = JSON.parse(list);
@ -241,7 +243,7 @@ export default class dnReceiptDom extends BasePage {
//
this.every = { ...e.pickerName };
this.newLocation = this.Location.filter((item: any) => item.sendSpot === this.every.sendSpot);
console.log("newLoction",this.newLocation);
console.log('newLoction', this.newLocation);
}
//
LocationChoice(e: any) {

@ -77,7 +77,7 @@
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.receiptAmount }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</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>
@ -162,7 +162,7 @@ export default class dnReceiptDom extends BasePage {
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
console.log("this.Locaton",this.Location);
console.log('this.Locaton', this.Location);
});
}
//
@ -177,6 +177,12 @@ export default class dnReceiptDom extends BasePage {
//
this.initLocation();
await this.model.queryOrderInInfo(this.form.documentNo);
if (model.code == '1') {
uni.showToast({
icon: 'none',
title: this.$t('message.successful') as any,
});
}
let list: any = localStorage.getItem('list');
// if (list) {
// uni.showToast({
@ -232,10 +238,10 @@ export default class dnReceiptDom extends BasePage {
materialChoice(e: any) {
//
this.every = { ...e.pickerName };
console.log("this.every",this.every);
console.log('this.every', this.every);
//guoshuang SAP
this.newLocation = this.Location.filter((item: any) => item.sendSpot === this.every.sendSpot);
console.log("newLoction",this.newLocation);
console.log('newLoction', this.newLocation);
}
//
LocationChoice(e: any) {

@ -1,16 +1,9 @@
import {
Action,
getModule,
Module,
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";
import httpjson from "@/utils/location";
import { Action, getModule, Module, 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';
import httpjson from '@/utils/location';
class OrderInInfo {
checked?: boolean;
@ -29,10 +22,10 @@ class OrderInInfo {
namespaced: true,
dynamic: true,
store,
name: "raw.ingoods.dnReceipt",
name: 'raw.ingoods.dnReceipt',
})
export class ReceiptModule extends VuexModule {
sendSpot = "";
sendSpot = '';
/**
* sap
*/
@ -40,7 +33,8 @@ export class ReceiptModule extends VuexModule {
/**
*
*/
dnNo = "";
dnNo = '';
code = '';
DNdetailedList: any;
/**
*
@ -128,7 +122,7 @@ export class ReceiptModule extends VuexModule {
loginName: session.loginName,
userDefined3: 1,
});
console.log("result", result);
console.log('result', result);
const cboPlaceList = result.data.records.map((_: any) => ({
label: _.sendSpot,
value: _.sendSpot,
@ -143,46 +137,38 @@ export class ReceiptModule extends VuexModule {
*/
@MutationAction
async queryOrderInInfo(dnNo: string) {
const { list }: any = await http.post(url.material.DNorderin.info, {
const { list, code }: any = await http.post(url.material.DNorderin.info, {
dnNo,
factoryCode: session.factoryCode,
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.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 };
localStorage.setItem('list', JSON.stringify(list) as any);
localStorage.setItem('sendSpot', JSON.stringify(list[0].sendSpot) as any);
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx, code };
}
//海外DN 根据单号查询物料
@MutationAction
async ImportQueryOrderInfo(dnNo: string) {
const { list }: any = await http.post(url.material.DNorderin.ImportInfo, {
const { list, code }: any = await http.post(url.material.DNorderin.ImportInfo, {
dnNo,
factoryCode: session.factoryCode,
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.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 };
localStorage.setItem('list', JSON.stringify(list) as any);
localStorage.setItem('sendSpot', JSON.stringify(list[0].sendSpot) as any);
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx, code };
}
/**
*
@ -200,13 +186,10 @@ 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)
);
const orderInInfoList = result.list.sort((a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus));
return { orderInInfoList };
}
//海外DN提交
@ -223,21 +206,18 @@ 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)
);
const orderInInfoList = result.list.sort((a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus));
return { orderInInfoList };
}
/**
*
*/
@Action({ commit: "updateCheckedOrderInInfoListKw" })
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async changeOrderInLocation(kw: string) {
await http.post("/wmspda/material/orderin/enter", {
await http.post('/wmspda/material/orderin/enter', {
warehouseCode: session.warehouseCode,
factoryCode: session.factoryCode,
loginName: session.loginName,
@ -245,19 +225,16 @@ export class ReceiptModule extends VuexModule {
});
return kw;
}
@Action({ commit: "updateCheckedOrderInInfoListKw" })
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async queryByFactoryCodeAndWorkAreaCode(content: any) {
let res = await http.post(
"wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
content
);
let res = await http.post('wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
return res;
}
//查询DN/海外DN收货明细
@Action({ commit: "updateCheckedOrderInInfoListKw" })
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async querydetaildlist(content: any) {
let res: any = await http.post("/wmspda/material/getDnRecSn", content);
console.log("明细》》》》》》》》》", res.list);
let res: any = await http.post('/wmspda/material/getDnRecSn', content);
console.log('明细》》》》》》》》》', res.list);
this.DNdetailedList = res.list;
return res;
}

Loading…
Cancel
Save