收货 退货 拣配界面调整

master
hou 4 years ago
parent 8a0e0952fa
commit f1bf749747

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

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

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

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

@ -5,17 +5,17 @@ import {
Action, Action,
MutationAction, MutationAction,
VuexModule, VuexModule,
} from 'vuex-module-decorators'; } from "vuex-module-decorators";
import store from '@/store'; import store from "@/store";
import http from '@/utils/request'; import http from "@/utils/request";
import { url } from '@/utils/url'; import { url } from "@/utils/url";
import { cloneDeep } from 'lodash/fp'; 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 {
/** /**
@ -116,7 +116,13 @@ export class AggregatingModule extends VuexModule {
* @param params * @param params
*/ */
@Mutation @Mutation
setAggregateListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) { setAggregateListItemHvAmount({
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);
@ -127,7 +133,13 @@ export class AggregatingModule extends VuexModule {
* @param params * @param params
*/ */
@Mutation @Mutation
setOrderListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) { setOrderListItemHvAmount({
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);
@ -147,7 +159,13 @@ export class AggregatingModule extends VuexModule {
* @param params * @param params
*/ */
@Mutation @Mutation
setAccessoryListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) { setAccessoryListItemHvAmount({
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);
@ -183,8 +201,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 };
@ -196,7 +214,10 @@ export class AggregatingModule extends VuexModule {
*/ */
@MutationAction @MutationAction
async queryProOrderResult(params: any) { 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 }; return { proOrderResultList };
} }
@ -206,11 +227,14 @@ export class AggregatingModule extends VuexModule {
*/ */
@MutationAction @MutationAction
async queryAggregateList(params: any) { 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) { if (!aggregateList.length) {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: 'No Data Found', title: "No Data Found",
}); });
} }
return { aggregateList }; return { aggregateList };
@ -234,11 +258,14 @@ export class AggregatingModule extends VuexModule {
*/ */
@MutationAction @MutationAction
async queryAccessoryList(params: any) { 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) { if (!accessoryList.length) {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: 'No Data Found', title: "No Data Found",
}); });
} }
return { accessoryList }; return { accessoryList };
@ -252,8 +279,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",
}); });
} }
@ -265,6 +292,15 @@ export class AggregatingModule extends VuexModule {
async uploadAccessoryList(params: any) { async uploadAccessoryList(params: any) {
return http.post(url.sumscan.u.fllist, params); return http.post(url.sumscan.u.fllist, params);
} }
@Action({ commit: "updateCheckedOrderInInfoListKw" })
async queryByFactoryCodeAndWorkAreaCode(content: any) {
let res = await http.post(
"/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
content
);
return res;
}
} }
export default getModule(AggregatingModule); export default getModule(AggregatingModule);

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

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

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

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

@ -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,56 +15,56 @@ 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_factory'), label: vm.$t("message.Pi_factory"),
key: 'sapFactoryCode', key: "sapFactoryCode",
}, },
{ {
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: 'prdMaterialDesc', key: "prdMaterialDesc",
width: 300, width: 300,
}, },
{ {
label: vm.$t('message.po_Location'), label: vm.$t("message.po_Location"),
key: 'wkposCode', key: "wkposCode",
}, },
]; ];
@ -73,40 +73,40 @@ 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.po_DemandQuantity'), label: vm.$t("message.po_DemandQuantity"),
key: 'amount', key: "amount",
}, },
{ {
label: vm.$t('message.Pi_CurrentPickingQuantity'), label: vm.$t("message.Pi_CurrentPickingQuantity"),
key: 'currentAmount', key: "currentAmount",
width: 300, width: 300,
}, },
{ {
label: vm.$t('message.Pi_PickedQuantity'), label: vm.$t("message.Pi_PickedQuantity"),
key: 'totalMoAmount', key: "totalMoAmount",
}, },
{ {
label: vm.$t('message.Pi_QuantityHandedOver'), label: vm.$t("message.Pi_QuantityHandedOver"),
key: 'totalHvAmount', key: "totalHvAmount",
}, },
{ {
label: vm.$t('message.po_Location'), label: vm.$t("message.po_Location"),
// key: 'currentWkposCode', // key: 'currentWkposCode',
key: 'wkposCode', key: "wkposCode",
}, },
{ {
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: '成品型号', // label: '成品型号',
@ -128,56 +128,56 @@ 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.po_DemandQuantity'), label: vm.$t("message.po_DemandQuantity"),
key: 'amount', key: "amount",
}, },
{ {
label: vm.$t('message.Pi_CurrentPickingQuantity'), label: vm.$t("message.Pi_CurrentPickingQuantity"),
key: 'currentAmount', key: "currentAmount",
width: 300, width: 300,
}, },
{ {
label: vm.$t('message.Pi_PickedQuantity'), label: vm.$t("message.Pi_PickedQuantity"),
key: 'totalMoAmount', key: "totalMoAmount",
}, },
{ {
label: vm.$t('message.Pi_QuantityHandedOver'), label: vm.$t("message.Pi_QuantityHandedOver"),
key: 'totalHvAmount', key: "totalHvAmount",
}, },
{ {
label: vm.$t('message.po_Location'), label: vm.$t("message.po_Location"),
// key: 'currentWkposCode', // key: 'currentWkposCode',
key: 'wkposCode', key: "wkposCode",
}, },
{ {
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.Pi_FinishedProductModel'), label: vm.$t("message.Pi_FinishedProductModel"),
key: 'prdMaterialDesc', key: "prdMaterialDesc",
width: 300, width: 300,
}, },
{ {
label: vm.$t('message.Pi_factory'), label: vm.$t("message.Pi_factory"),
key: 'sapFactoryCode', key: "sapFactoryCode",
}, },
{ {
label: vm.$t('message.Pi_Station'), label: vm.$t("message.Pi_Station"),
key: 'sendSpot', key: "sendSpot",
}, },
{ {
label: vm.$t('message.Pi_OrderNo'), label: vm.$t("message.Pi_OrderNo"),
key: 'prdOrder', key: "prdOrder",
}, },
]; ];

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

@ -242,6 +242,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);
this.toPage(this.page.raw.handover.picking.result); this.toPage(this.page.raw.handover.picking.result);
}); });
} }

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

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

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

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

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

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

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

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

@ -157,6 +157,7 @@ export class ReceiptModule extends VuexModule {
// 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("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 };
} }
@ -165,11 +166,11 @@ export class ReceiptModule extends VuexModule {
* *
*/ */
@MutationAction @MutationAction
async submitOrderInEnter() { async submitOrderInEnter(list: any) {
const list = (this.state as any).orderInInfoList.map((item: any) => { // const list = (this.state as any).orderInInfoList.map((item: any) => {
item.orderStatus = item.checked ? "2" : "1"; // // item.orderStatus = item.checked ? "2" : "1";
return item; // return item;
}); // });
const result: any = await http.post(url.material.DNorderin.enter, { const result: any = await http.post(url.material.DNorderin.enter, {
dnNo: this.dnNo, dnNo: this.dnNo,
factoryCode: session.factoryCode, factoryCode: session.factoryCode,

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save