交接 问题修复

master
hou 4 years ago
parent 5a1850da5c
commit 0c005a94b9

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

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

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

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

@ -1,27 +1,21 @@
import { import { getModule, Module, Mutation, Action, MutationAction, VuexModule } from 'vuex-module-decorators';
getModule, import store from '@/store';
Module, import http from '@/utils/request';
Mutation, import { url } from '@/utils/url';
Action, import { cloneDeep } from 'lodash/fp';
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({ @Module({
namespaced: true, namespaced: true,
dynamic: true, dynamic: true,
store, store,
name: "raw.handover.aggregating", name: 'raw.handover.aggregating',
}) })
export class AggregatingModule extends VuexModule { export class AggregatingModule extends VuexModule {
/** /**
* *
*/ */
proOrderList = []; proOrderList = [];
param: any;
/** /**
* *
@ -116,13 +110,7 @@ export class AggregatingModule extends VuexModule {
* @param params * @param params
*/ */
@Mutation @Mutation
setAggregateListItemHvAmount({ setAggregateListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
index,
hvAmount,
}: {
index: number;
hvAmount: number;
}) {
const original = this.aggregateList[index]; const original = this.aggregateList[index];
const newItem = { ...original, hvAmount }; const newItem = { ...original, hvAmount };
this.aggregateList.splice(index, 1, newItem); this.aggregateList.splice(index, 1, newItem);
@ -133,13 +121,7 @@ export class AggregatingModule extends VuexModule {
* @param params * @param params
*/ */
@Mutation @Mutation
setOrderListItemHvAmount({ setOrderListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
index,
hvAmount,
}: {
index: number;
hvAmount: number;
}) {
const original = this.orderList[index]; const original = this.orderList[index];
const newItem = { ...original, hvAmount }; const newItem = { ...original, hvAmount };
this.orderList.splice(index, 1, newItem); this.orderList.splice(index, 1, newItem);
@ -159,13 +141,7 @@ export class AggregatingModule extends VuexModule {
* @param params * @param params
*/ */
@Mutation @Mutation
setAccessoryListItemHvAmount({ setAccessoryListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
index,
hvAmount,
}: {
index: number;
hvAmount: number;
}) {
const original = this.accessoryList[index]; const original = this.accessoryList[index];
const newItem = { ...original, hvAmount }; const newItem = { ...original, hvAmount };
this.accessoryList.splice(index, 1, newItem); this.accessoryList.splice(index, 1, newItem);
@ -201,8 +177,8 @@ export class AggregatingModule extends VuexModule {
proOrderList.forEach((_: any) => (_.checked = true)); proOrderList.forEach((_: any) => (_.checked = true));
if (!proOrderList.length) { if (!proOrderList.length) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: "No Data Found", title: 'No Data Found',
}); });
} }
return { proOrderList }; return { proOrderList };
@ -214,10 +190,12 @@ export class AggregatingModule extends VuexModule {
*/ */
@MutationAction @MutationAction
async queryProOrderResult(params: any) { async queryProOrderResult(params: any) {
const { list: proOrderResultList }: any = await http.post( const { list: proOrderResultList }: any = await http.post(url.sumscan.query.ordoutlist, params);
url.sumscan.query.ordoutlist, return { proOrderResultList };
params }
); @MutationAction
async queryProOrders() {
const { list: proOrderResultList }: any = await http.post(url.sumscan.query.ordoutlist, this.param);
return { proOrderResultList }; return { proOrderResultList };
} }
@ -227,14 +205,11 @@ export class AggregatingModule extends VuexModule {
*/ */
@MutationAction @MutationAction
async queryAggregateList(params: any) { async queryAggregateList(params: any) {
const { list: aggregateList }: any = await http.post( const { list: aggregateList }: any = await http.post(url.sumscan.query.hzlist, params);
url.sumscan.query.hzlist,
params
);
if (!aggregateList.length) { if (!aggregateList.length) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: "No Data Found", title: 'No Data Found',
}); });
} }
return { aggregateList }; return { aggregateList };
@ -258,14 +233,11 @@ export class AggregatingModule extends VuexModule {
*/ */
@MutationAction @MutationAction
async queryAccessoryList(params: any) { async queryAccessoryList(params: any) {
const { list: accessoryList }: any = await http.post( const { list: accessoryList }: any = await http.post(url.sumscan.query.fllist, params);
url.sumscan.query.fllist,
params
);
if (!accessoryList.length) { if (!accessoryList.length) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: "No Data Found", title: 'No Data Found',
}); });
} }
return { accessoryList }; return { accessoryList };
@ -279,8 +251,8 @@ export class AggregatingModule extends VuexModule {
async uploadOrderList(params: any) { async uploadOrderList(params: any) {
await http.post(url.sumscan.u.order, params); await http.post(url.sumscan.u.order, params);
uni.showToast({ uni.showToast({
icon: "success", icon: 'success',
title: "success", title: 'success',
}); });
} }
@ -293,12 +265,9 @@ export class AggregatingModule extends VuexModule {
return http.post(url.sumscan.u.fllist, params); return http.post(url.sumscan.u.fllist, params);
} }
@Action({ commit: "updateCheckedOrderInInfoListKw" }) @Action({ commit: 'updateCheckedOrderInInfoListKw' })
async queryByFactoryCodeAndWorkAreaCode(content: any) { async queryByFactoryCodeAndWorkAreaCode(content: any) {
let res = await http.post( let res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
"/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
content
);
return res; return res;
} }
} }

@ -8,7 +8,7 @@
<view class="right"></view> <view class="right"></view>
</view> </view>
<view class="table-wrapper"> <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>
<view class="bottom-bar"> <view class="bottom-bar">
<view class="extra"> <view class="extra">
@ -185,35 +185,46 @@ export default class AggregatingOrder extends BasePage {
const totalHvAmount = parseFloat(firstSelection.totalHvAmount); const totalHvAmount = parseFloat(firstSelection.totalHvAmount);
// //
const totalMoAmount = parseFloat(firstSelection.totalMoAmount); 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({ uni.showToast({
icon: 'none', icon: 'none',
title: this.$t('message.Pi_tip2') as string, title: this.$t('message.Pi_tip12') as string,
}); });
return; 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({ model.setOrderListItemHvAmount({
index: this.model.orderList.findIndex((_) => _.checked), index: this.model.orderList.findIndex((_) => _.checked),
hvAmount: currentPickNum, hvAmount: currentPickNum,
}); });
} // if (currentPickNum + totalHvAmount - totalMoAmount > 0.000001) {
}, // uni.showModal({
}); // title: 'Tip',
} else { // content: this.$t('message.Pi_tip11') as string,
model.setOrderListItemHvAmount({ // confirmText: this.$t('message.workArea_Confirm') as string,
index: this.model.orderList.findIndex((_) => _.checked), // cancelText: this.$t('message.Cancel') as string,
hvAmount: currentPickNum, // 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.receiver = '';
this.submitForm.receiverName = ''; this.submitForm.receiverName = '';
this.submitForm.password = ''; this.submitForm.password = '';
await this.model.queryProOrders();
this.toPage(this.page.raw.handover.aggregating.order);
// setTimeout(() => { // setTimeout(() => {
// uni.navigateBack({ delta: 2 }); // uni.navigateBack({ delta: 2 });
// }, 2000); // }, 2000);
// uni.navigateBack({ delta: 2 }); // uni.navigateBack({ delta: 2 });
uni.showModal({ // uni.showModal({
title: this.$t('message.Pi_tip') as string, // title: this.$t('message.Pi_tip') as string,
content: this.$t('message.Warehouse_Tip9') as string, // content: this.$t('message.Warehouse_Tip9') as string,
confirmText: this.$t('message.workArea_Confirm') as string, // confirmText: this.$t('message.workArea_Confirm') as string,
showCancel: false, // showCancel: false,
success: () => { // success: () => {
this.toPage(this.page.raw.handover.aggregating.index); // this.toPage(this.page.raw.handover.aggregating.index);
}, // },
}); // });
} }
} }
}); });

@ -8,7 +8,7 @@
<view class="right"></view> <view class="right"></view>
</view> </view>
<view class="table-wrapper"> <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>
<view class="bottom-bar"> <view class="bottom-bar">
<view class="extra"> <view class="extra">
@ -194,28 +194,39 @@ export default class AggregatingSummary extends BasePage {
// }); // });
// return; // return;
// } // }
if (currentPickNum + totalHvAmount - totalMoAmount > 0.000001) { if (currentPickNum != totalMoAmount) {
uni.showModal({ uni.showToast({
title: 'Tip', icon: 'none',
content: this.$t('message.Pi_tip11') as string, title: this.$t('message.Pi_tip12') as string,
confirmText: this.$t('message.workArea_Confirm') as string, });
cancelText: this.$t('message.Cancel') as string, return;
showCancel: true, }
success: (res) => {
if (res.confirm) {
model.setAggregateListItemHvAmount({ model.setAggregateListItemHvAmount({
index: this.model.aggregateList.findIndex((_) => _.checked), index: this.model.aggregateList.findIndex((_) => _.checked),
hvAmount: currentPickNum, hvAmount: currentPickNum,
}); });
} // if (currentPickNum + totalHvAmount - totalMoAmount > 0.000001) {
}, // uni.showModal({
}); // title: 'Tip',
} else { // content: this.$t('message.Pi_tip11') as string,
model.setAggregateListItemHvAmount({ // confirmText: this.$t('message.workArea_Confirm') as string,
index: this.model.aggregateList.findIndex((_) => _.checked), // cancelText: this.$t('message.Cancel') as string,
hvAmount: currentPickNum, // 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.receiverName = '';
this.submitForm.password = ''; this.submitForm.password = '';
this.isBusinessFinished = true; this.isBusinessFinished = true;
await this.model.queryProOrders();
this.toPage(this.page.raw.handover.aggregating.summary);
// uni.navigateBack({ delta: 2 }); // uni.navigateBack({ delta: 2 });
// setTimeout(() => { // setTimeout(() => {
// uni.navigateBack({ delta: 2 }); // uni.navigateBack({ delta: 2 });
// }, 2000); // }, 2000);
uni.showModal({ // uni.showModal({
title: this.$t('message.Pi_tip') as string, // title: this.$t('message.Pi_tip') as string,
content: this.$t('message.Warehouse_Tip9') as string, // content: this.$t('message.Warehouse_Tip9') as string,
confirmText: this.$t('message.workArea_Confirm') as string, // confirmText: this.$t('message.workArea_Confirm') as string,
showCancel: false, // showCancel: false,
success: () => { // success: () => {
this.toPage(this.page.raw.handover.aggregating.index); // this.toPage(this.page.raw.handover.aggregating.index);
}, // },
}); // });
// uni.navigateBack({ delta: 1 }); // uni.navigateBack({ delta: 1 });
// model.clearProOrderResultList(); // model.clearProOrderResultList();
} }

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

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

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

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

@ -52,7 +52,6 @@ export default class returningDom extends BasePage {
endMobile = ''; endMobile = '';
materialList = []; materialList = [];
OddList: any = []; OddList: any = [];
<<<<<<< HEAD
data: any = { data: any = {
label: '', label: '',
value: '', value: '',
@ -60,15 +59,6 @@ export default class returningDom extends BasePage {
sendSpot: '', sendSpot: '',
}; };
=======
data: any = {
label: '',
value: '',
amount: '',
sendSpot: '',
};
>>>>>>> 9bcbb18... 退料 筛选后选择一条数据带回上一页面并初始化赋值
startParams = { startParams = {
year: true, year: true,
month: true, month: true,
@ -93,17 +83,12 @@ export default class returningDom extends BasePage {
this.endMobile = endParams.year + '-' + endParams.month + '-' + endParams.day; this.endMobile = endParams.year + '-' + endParams.month + '-' + endParams.day;
} }
onCheck(e: any) { onCheck(e: any) {
<<<<<<< HEAD
// 退 退 // 退 退
console.log('eeeee', e.data[0].lineData); console.log('eeeee', e.data[0].lineData);
this.data.label = e.data[0].lineData.label; this.data.label = e.data[0].lineData.label;
this.data.value = e.data[0].lineData.value; this.data.value = e.data[0].lineData.value;
this.data.sendSpot = e.data[0].lineData.sendSpot; this.data.sendSpot = e.data[0].lineData.sendSpot;
this.data.amount = e.data[0].lineData.amount; this.data.amount = e.data[0].lineData.amount;
=======
console.log('eeeee', e.data[0].lineData);
this.data = e.data[0].lineData;
>>>>>>> 9bcbb18... 退料 筛选后选择一条数据带回上一页面并初始化赋值
} }
back() { back() {
if (this.data.label == '' || this.data.label == null) { 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.wlCode }}</u-td>
<u-td class="u-td">{{ item.receiptAmount }}</u-td> <u-td class="u-td">{{ item.receiptAmount }}</u-td>
<u-td class="u-td"> <u-td class="u-td">
<div class="u-td" @click="deleteItem(index)"> <u-button type="error" size="small" style="font-size: 20px" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</u-button>
{{ $t('message.product_Delete') }}
</div>
</u-td> </u-td>
</u-tr> </u-tr>
</u-table> </u-table>
@ -147,9 +145,7 @@ export default class dnReceiptDom extends BasePage {
// //
upload: any = []; upload: any = [];
// //
async onReady() { async onReady() {}
}
// //
// //
async initLocation() { async initLocation() {
@ -183,6 +179,12 @@ export default class dnReceiptDom extends BasePage {
// //
this.initLocation(); this.initLocation();
await this.model.ImportQueryOrderInfo(this.form.documentNo); 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'); let list: any = localStorage.getItem('list');
localStorage.removeItem('list'); localStorage.removeItem('list');
this.material = JSON.parse(list); this.material = JSON.parse(list);
@ -241,7 +243,7 @@ export default class dnReceiptDom extends BasePage {
// //
this.every = { ...e.pickerName }; this.every = { ...e.pickerName };
this.newLocation = this.Location.filter((item: any) => item.sendSpot === this.every.sendSpot); 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) { LocationChoice(e: any) {

@ -77,7 +77,7 @@
<u-td class="u-td">{{ item.wlCode }}</u-td> <u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.receiptAmount }}</u-td> <u-td class="u-td">{{ item.receiptAmount }}</u-td>
<u-td class="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-td>
</u-tr> </u-tr>
</u-table> </u-table>
@ -162,7 +162,7 @@ export default class dnReceiptDom extends BasePage {
pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); 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(); this.initLocation();
await this.model.queryOrderInInfo(this.form.documentNo); 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'); let list: any = localStorage.getItem('list');
// if (list) { // if (list) {
// uni.showToast({ // uni.showToast({
@ -232,10 +238,10 @@ export default class dnReceiptDom extends BasePage {
materialChoice(e: any) { materialChoice(e: any) {
// //
this.every = { ...e.pickerName }; this.every = { ...e.pickerName };
console.log("this.every",this.every); console.log('this.every', this.every);
//guoshuang SAP //guoshuang SAP
this.newLocation = this.Location.filter((item: any) => item.sendSpot === this.every.sendSpot); 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) { LocationChoice(e: any) {

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

Loading…
Cancel
Save