From f1bf749747c4512962ca72587904142bebde8f9f Mon Sep 17 00:00:00 2001
From: hou <1601990943@qq.com>
Date: Thu, 18 Nov 2021 11:07:53 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=B4=A7=20=E9=80=80=E8=B4=A7=20?=
=?UTF-8?q?=E6=8B=A3=E9=85=8D=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/i18n/lang/cn.ts | 1 +
src/i18n/lang/en.ts | 1 +
src/pages.json | 56 +++++
src/pages/raw/handover/aggregating/config.ts | 138 ++++++------
src/pages/raw/handover/aggregating/model.ts | 76 +++++--
src/pages/raw/handover/aggregating/order.vue | 205 +++++++++++------
src/pages/raw/handover/aggregating/result.vue | 35 +--
.../raw/handover/aggregating/summary.vue | 210 ++++++++++++------
src/pages/raw/handover/feeding/model.ts | 29 ++-
src/pages/raw/handover/picking/config.ts | 134 +++++------
src/pages/raw/handover/picking/idetailed.vue | 87 ++++----
src/pages/raw/handover/picking/index.vue | 1 +
src/pages/raw/handover/picking/order.vue | 66 +++---
src/pages/raw/handover/picking/result.vue | 4 +-
src/pages/raw/handover/picking/summary.vue | 82 ++++---
src/pages/raw/handover/picking/total.vue | 85 ++++---
src/pages/raw/handover/returning/index.vue | 171 ++++++++++----
src/pages/raw/ingoods/dnReceipt/detail.vue | 96 ++++----
src/pages/raw/ingoods/dnReceipt/idetailed.vue | 57 +++--
src/pages/raw/ingoods/dnReceipt/index.vue | 4 +-
src/pages/raw/ingoods/dnReceipt/model.ts | 11 +-
.../raw/ingoods/dnReturnGoods/detail.vue | 3 +
src/pages/raw/ingoods/dnReturnGoods/index.vue | 2 +-
src/pages/raw/ingoods/dnReturnGoods/model.ts | 53 +++--
src/pages/raw/ingoods/index.vue | 20 +-
src/pages/raw/ingoods/poReceipt/detail.vue | 97 ++++----
src/pages/raw/ingoods/poReceipt/idetailed.vue | 69 +++++-
src/pages/raw/ingoods/poReceipt/index.vue | 4 +
src/pages/raw/ingoods/poReceipt/model.ts | 13 +-
src/store/index.ts | 20 +-
src/utils/page.ts | 8 +
31 files changed, 1123 insertions(+), 715 deletions(-)
diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts
index 13ac542..20ba433 100644
--- a/src/i18n/lang/cn.ts
+++ b/src/i18n/lang/cn.ts
@@ -65,6 +65,7 @@ export default {
po_PleaseInputcar: "请输入周转车",
po_PleaseSlect: "请选择库存地点",
po_Detailed: "PO单明细",
+ detailed: "明细",
po_Total: "共",
po_Records: "条",
po_SelectAll: "全选",
diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts
index 6070aad..8216795 100644
--- a/src/i18n/lang/en.ts
+++ b/src/i18n/lang/en.ts
@@ -120,6 +120,7 @@ export default {
Pi_upload: "Upload",
Pi_tip1: "Please input the pick Qty",
Pi_tip2: "The pick up Qty is an greater than 0",
+ detailed: "detailed",
Pi_tip3: "Please update the pick up Qty before uploading",
Pi_tip10: "Please update the append Qty before uploading",
Pi_tip4: "No data available to upload",
diff --git a/src/pages.json b/src/pages.json
index 4cd78ae..b48e5aa 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -266,6 +266,30 @@
"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
}
},
+ {
+ "path": "pages/raw/ingoods/dnReceipt/bill",
+ "style": {
+ "navigationBarTitleText": "收货明细",
+ "navigationStyle": "custom",// 隐藏系统导航栏
+ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+ }
+ },
+ {
+ "path": "pages/raw/ingoods/dnReceipt/dnReceiving",
+ "style": {
+ "navigationBarTitleText": "DN单收货",
+ "navigationStyle": "custom",// 隐藏系统导航栏
+ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+ }
+ },
+ {
+ "path": "pages/raw/ingoods/poReceipt/poReceiving",
+ "style": {
+ "navigationBarTitleText": "PO单收货",
+ "navigationStyle": "custom",// 隐藏系统导航栏
+ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+ }
+ },
{
"path": "pages/raw/ingoods/dnReceipt/idetailed",
"style": {
@@ -298,6 +322,14 @@
"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
}
},
+ {
+ "path": "pages/raw/ingoods/dnReturnGoods/Location",
+ "style": {
+ "navigationBarTitleText": "DN退货",
+ "navigationStyle": "custom",// 隐藏系统导航栏
+ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+ }
+ },
{
"path": "pages/raw/ingoods/dnReturnGoods/detail",
"style": {
@@ -314,6 +346,14 @@
"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
}
},
+ {
+ "path": "pages/raw/handover/picking/ByOrder",
+ "style": {
+ "navigationBarTitleText": "按单拣配",
+ "navigationStyle": "custom",// 隐藏系统导航栏
+ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+ }
+ },
{
"path": "pages/raw/handover/picking/query",
"style": {
@@ -338,6 +378,14 @@
"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
}
},
+ {
+ "path": "pages/raw/handover/picking/BySummary",
+ "style": {
+ "navigationBarTitleText": "汇总拣配",
+ "navigationStyle": "custom",// 隐藏系统导航栏
+ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+ }
+ },
{
"path": "pages/raw/handover/picking/summary",
"style": {
@@ -370,6 +418,14 @@
"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
}
},
+ {
+ "path": "pages/raw/handover/feeding/Location",
+ "style": {
+ "navigationBarTitleText": "补料",
+ "navigationStyle": "custom",// 隐藏系统导航栏
+ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+ }
+ },
{
"path": "pages/raw/handover/feeding/detail",
"style": {
diff --git a/src/pages/raw/handover/aggregating/config.ts b/src/pages/raw/handover/aggregating/config.ts
index 8c285a6..64d21b8 100644
--- a/src/pages/raw/handover/aggregating/config.ts
+++ b/src/pages/raw/handover/aggregating/config.ts
@@ -1,11 +1,11 @@
/**
* 汇总查询表格列
*/
-import vm from '@/main';
+import vm from "@/main";
export const headers = [
{
- label: vm.$t('message.Pi_OrderNo'),
- key: 'prdOrder',
+ label: vm.$t("message.Pi_OrderNo"),
+ key: "prdOrder",
width: 550,
},
];
@@ -15,51 +15,51 @@ export const headers = [
*/
export const resultHeaders = [
{
- label: vm.$t('message.po_MaterielNo'),
- key: 'materialCode',
+ label: vm.$t("message.po_MaterielNo"),
+ key: "materialCode",
width: 220,
},
{
- label: vm.$t('message.po_DemandQuantity'),
- key: 'amount',
+ label: vm.$t("message.po_DemandQuantity"),
+ key: "amount",
},
{
- label: vm.$t('message.Pi_CumulativePickingQuantity'),
- key: 'totalMoAmount',
+ label: vm.$t("message.Pi_CumulativePickingQuantity"),
+ key: "totalMoAmount",
width: 300,
},
{
- label: vm.$t('message.Pi_HandoverQuantity'),
- key: 'totalHvAmount',
+ label: vm.$t("message.Pi_HandoverQuantity"),
+ key: "totalHvAmount",
},
{
- label: vm.$t('message.Pi_Station'),
- key: 'sendSpot',
+ label: vm.$t("message.Pi_Station"),
+ key: "sendSpot",
},
{
- label: vm.$t('message.po_MaterielDes'),
- key: 'materialDesc',
+ label: vm.$t("message.po_MaterielDes"),
+ key: "materialDesc",
width: 350,
},
{
- label: 'MRP',
- key: 'mrpCode',
+ label: "MRP",
+ key: "mrpCode",
},
{
- label: vm.$t('message.Pi_unit'),
- key: 'unit',
+ label: vm.$t("message.Pi_unit"),
+ key: "unit",
},
{
- label: vm.$t('message.Pi_OrderNo'),
- key: 'prdOrder',
+ label: vm.$t("message.Pi_OrderNo"),
+ key: "prdOrder",
},
{
- label: vm.$t('message.Pi_FinishedProductModel'),
- key: 'proType',
+ label: vm.$t("message.Pi_FinishedProductModel"),
+ key: "proType",
},
{
- label: vm.$t('message.po_Location'),
- key: 'wkposCode',
+ label: vm.$t("message.po_Location"),
+ key: "wkposCode",
},
];
@@ -68,47 +68,47 @@ export const resultHeaders = [
*/
export const summaryHeaders = [
{
- label: vm.$t('message.po_MaterielNo'),
- key: 'materialCode',
+ label: vm.$t("message.po_MaterielNo"),
+ key: "materialCode",
width: 220,
},
{
- label: vm.$t('message.Summary_QuantityOfThisHandover'),
- key: 'hvAmount',
+ label: vm.$t("message.Summary_QuantityOfThisHandover"),
+ key: "hvAmount",
},
{
- label: vm.$t('message.po_DemandQuantity'),
- key: 'amount',
+ label: vm.$t("message.po_DemandQuantity"),
+ key: "amount",
},
{
- label: vm.$t('message.Pi_CumulativePickingQuantity'),
- key: 'totalMoAmount',
+ label: vm.$t("message.Pi_CumulativePickingQuantity"),
+ key: "totalMoAmount",
width: 300,
},
{
- label: vm.$t('message.Pi_HandoverQuantity'),
- key: 'totalHvAmount',
+ label: vm.$t("message.Pi_HandoverQuantity"),
+ key: "totalHvAmount",
},
{
- label: vm.$t('message.Pi_Station'),
- key: 'sendSpot',
+ label: vm.$t("message.Pi_Station"),
+ key: "sendSpot",
},
{
- label: vm.$t('message.po_MaterielDes'),
- key: 'materialDesc',
+ label: vm.$t("message.po_MaterielDes"),
+ key: "materialDesc",
width: 350,
},
{
- label: vm.$t('message.Pi_unit'),
- key: 'unit',
+ label: vm.$t("message.Pi_unit"),
+ key: "unit",
},
{
- label: vm.$t('message.Summary_FinishedProductMaterialNumber'),
- key: 'prdMaterialCode',
+ label: vm.$t("message.Summary_FinishedProductMaterialNumber"),
+ key: "prdMaterialCode",
},
{
- label: vm.$t('message.po_Location'),
- key: 'wkposCode',
+ label: vm.$t("message.po_Location"),
+ key: "wkposCode",
},
];
@@ -117,54 +117,54 @@ export const summaryHeaders = [
*/
export const orderHeaders = [
{
- label: vm.$t('message.po_MaterielNo'),
- key: 'materialCode',
+ label: vm.$t("message.po_MaterielNo"),
+ key: "materialCode",
width: 220,
},
{
- label: vm.$t('message.Summary_QuantityOfThisHandover'),
- key: 'hvAmount',
+ label: vm.$t("message.Summary_QuantityOfThisHandover"),
+ key: "hvAmount",
},
{
- label: vm.$t('message.po_DemandQuantity'),
- key: 'amount',
+ label: vm.$t("message.po_DemandQuantity"),
+ key: "amount",
},
{
- label: vm.$t('message.Pi_CumulativePickingQuantity'),
- key: 'totalMoAmount',
+ label: vm.$t("message.Pi_CumulativePickingQuantity"),
+ key: "totalMoAmount",
width: 300,
},
{
- label: vm.$t('message.Pi_HandoverQuantity'),
- key: 'totalHvAmount',
+ label: vm.$t("message.Pi_HandoverQuantity"),
+ key: "totalHvAmount",
},
{
- label: vm.$t('message.Pi_Station'),
- key: 'sendSpot',
+ label: vm.$t("message.Pi_Station"),
+ key: "sendSpot",
},
{
- label: vm.$t('message.po_MaterielDes'),
- key: 'materialDesc',
+ label: vm.$t("message.po_MaterielDes"),
+ key: "materialDesc",
width: 350,
},
{
- label: vm.$t('message.Pi_unit'),
- key: 'unit',
+ label: vm.$t("message.Pi_unit"),
+ key: "unit",
},
{
- label: 'MRP',
- key: 'mrpCode',
+ label: "MRP",
+ key: "mrpCode",
},
{
- label: vm.$t('message.Pi_OrderNo'),
- key: 'prdOrder',
+ label: vm.$t("message.Pi_OrderNo"),
+ key: "prdOrder",
},
{
- label: vm.$t('message.Pi_FinishedProductModel'),
- key: 'proType',
+ label: vm.$t("message.Pi_FinishedProductModel"),
+ key: "proType",
},
{
- label: vm.$t('message.po_Location'),
- key: 'wkposCode',
+ label: vm.$t("message.po_Location"),
+ key: "wkposCode",
},
];
diff --git a/src/pages/raw/handover/aggregating/model.ts b/src/pages/raw/handover/aggregating/model.ts
index 1bbc468..6c96ba9 100644
--- a/src/pages/raw/handover/aggregating/model.ts
+++ b/src/pages/raw/handover/aggregating/model.ts
@@ -5,17 +5,17 @@ import {
Action,
MutationAction,
VuexModule,
-} from 'vuex-module-decorators';
-import store from '@/store';
-import http from '@/utils/request';
-import { url } from '@/utils/url';
-import { cloneDeep } from 'lodash/fp';
+} from "vuex-module-decorators";
+import store from "@/store";
+import http from "@/utils/request";
+import { url } from "@/utils/url";
+import { cloneDeep } from "lodash/fp";
@Module({
namespaced: true,
dynamic: true,
store,
- name: 'raw.handover.aggregating',
+ name: "raw.handover.aggregating",
})
export class AggregatingModule extends VuexModule {
/**
@@ -116,7 +116,13 @@ export class AggregatingModule extends VuexModule {
* @param params
*/
@Mutation
- setAggregateListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
+ setAggregateListItemHvAmount({
+ index,
+ hvAmount,
+ }: {
+ index: number;
+ hvAmount: number;
+ }) {
const original = this.aggregateList[index];
const newItem = { ...original, hvAmount };
this.aggregateList.splice(index, 1, newItem);
@@ -127,7 +133,13 @@ export class AggregatingModule extends VuexModule {
* @param params
*/
@Mutation
- setOrderListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
+ setOrderListItemHvAmount({
+ index,
+ hvAmount,
+ }: {
+ index: number;
+ hvAmount: number;
+ }) {
const original = this.orderList[index];
const newItem = { ...original, hvAmount };
this.orderList.splice(index, 1, newItem);
@@ -147,7 +159,13 @@ export class AggregatingModule extends VuexModule {
* @param params
*/
@Mutation
- setAccessoryListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) {
+ setAccessoryListItemHvAmount({
+ index,
+ hvAmount,
+ }: {
+ index: number;
+ hvAmount: number;
+ }) {
const original = this.accessoryList[index];
const newItem = { ...original, hvAmount };
this.accessoryList.splice(index, 1, newItem);
@@ -183,8 +201,8 @@ export class AggregatingModule extends VuexModule {
proOrderList.forEach((_: any) => (_.checked = true));
if (!proOrderList.length) {
uni.showToast({
- icon: 'none',
- title: 'No Data Found!',
+ icon: "none",
+ title: "No Data Found!",
});
}
return { proOrderList };
@@ -196,7 +214,10 @@ export class AggregatingModule extends VuexModule {
*/
@MutationAction
async queryProOrderResult(params: any) {
- const { list: proOrderResultList }: any = await http.post(url.sumscan.query.ordoutlist, params);
+ const { list: proOrderResultList }: any = await http.post(
+ url.sumscan.query.ordoutlist,
+ params
+ );
return { proOrderResultList };
}
@@ -206,11 +227,14 @@ export class AggregatingModule extends VuexModule {
*/
@MutationAction
async queryAggregateList(params: any) {
- const { list: aggregateList }: any = await http.post(url.sumscan.query.hzlist, params);
+ const { list: aggregateList }: any = await http.post(
+ url.sumscan.query.hzlist,
+ params
+ );
if (!aggregateList.length) {
uni.showToast({
- icon: 'none',
- title: 'No Data Found!',
+ icon: "none",
+ title: "No Data Found!",
});
}
return { aggregateList };
@@ -234,11 +258,14 @@ export class AggregatingModule extends VuexModule {
*/
@MutationAction
async queryAccessoryList(params: any) {
- const { list: accessoryList }: any = await http.post(url.sumscan.query.fllist, params);
+ const { list: accessoryList }: any = await http.post(
+ url.sumscan.query.fllist,
+ params
+ );
if (!accessoryList.length) {
uni.showToast({
- icon: 'none',
- title: 'No Data Found!',
+ icon: "none",
+ title: "No Data Found!",
});
}
return { accessoryList };
@@ -252,8 +279,8 @@ export class AggregatingModule extends VuexModule {
async uploadOrderList(params: any) {
await http.post(url.sumscan.u.order, params);
uni.showToast({
- icon: 'success',
- title: 'success',
+ icon: "success",
+ title: "success",
});
}
@@ -265,6 +292,15 @@ export class AggregatingModule extends VuexModule {
async uploadAccessoryList(params: any) {
return http.post(url.sumscan.u.fllist, params);
}
+
+ @Action({ commit: "updateCheckedOrderInInfoListKw" })
+ async queryByFactoryCodeAndWorkAreaCode(content: any) {
+ let res = await http.post(
+ "/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
+ content
+ );
+ return res;
+ }
}
export default getModule(AggregatingModule);
diff --git a/src/pages/raw/handover/aggregating/order.vue b/src/pages/raw/handover/aggregating/order.vue
index 82c35d6..0f2a47f 100644
--- a/src/pages/raw/handover/aggregating/order.vue
+++ b/src/pages/raw/handover/aggregating/order.vue
@@ -4,7 +4,7 @@
- {{ $t('message.Summary_HandoverByOrder') }}
+ {{ $t("message.Summary_HandoverByOrder") }}
@@ -54,7 +54,10 @@
-
+
- {{ $t('message.po_SelectAll') }}
+ {{ $t("message.po_SelectAll") }}
- {{ $t('message.dn_Confirm') }}
+
+ {{ $t("message.dn_Confirm") }}
+
- {{ $t('message.po_Submit') }}
+
+ {{ $t("message.po_Submit") }}
+
@@ -85,24 +92,24 @@
diff --git a/src/pages/raw/handover/picking/summary.vue b/src/pages/raw/handover/picking/summary.vue
index a4bca6a..1729a6b 100644
--- a/src/pages/raw/handover/picking/summary.vue
+++ b/src/pages/raw/handover/picking/summary.vue
@@ -136,14 +136,16 @@ export default class RawReceiptDetail extends BasePage {
* 表头
*/
headers = summaryHeaders;
-
- onLoad() {
+ onShow() {
this.model.queryLocationList();
- }
-
- // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
- onReady() {
- this.$form.setRules(this.rules);
+ this.model.aggregateList.forEach((item: any) => {
+ item.currentAmount = 0;
+ });
+ let ant: any = JSON.parse(sessionStorage.getItem("material") as string);
+ let index: any = JSON.parse(sessionStorage.getItem("index") as string);
+ this.model.aggregateList[index] = ant;
+ sessionStorage.removeItem("material");
+ sessionStorage.removeItem("index");
}
appoint() {
let selectStatus = model.aggregateList.map((item) => {
@@ -162,12 +164,12 @@ export default class RawReceiptDetail extends BasePage {
if (i > 1) {
uni.showToast({
icon: "none",
- title: "只能选择一个DN单" as string,
+ title: "只能选择一条物料" as string,
});
} else if (i == 0) {
uni.showToast({
icon: "none",
- title: "请选择一个DN单" as string,
+ title: "请选择一条物料" as string,
});
} else {
let mater: number = selectStatus.indexOf(true);
@@ -183,38 +185,52 @@ export default class RawReceiptDetail extends BasePage {
* 上传
*/
async onUpload() {
- if (!this.model.hasAggregateCurrentAmount) {
+ //判断是否有数据
+ if (this.model.aggregateList.length === 0) {
uni.showToast({
icon: "none",
- title: this.$t("message.Pi_tip7") as string,
+ title: this.$t("message.Pi_tip4") as string,
});
return;
}
const includeOrderOutIdList = this.model.proOrderResultList.map(
(_: any) => _.orderOutId
);
- const dataList = this.model.aggregateUploadList;
- const params = {
- factoryCode: session.factoryCode,
- loginName: session.loginName,
- dataList,
- includeOrderOutIdList,
- };
- await this.model.saveAggregateUpload(params);
- // uni.navigateBack({ delta: 2 });
- setTimeout(() => {
- uni.navigateBack({ delta: 2 });
- }, 2000);
- // this.toPage(this.page.raw.handover.picking.index);
- // uni.showModal({
- // title: this.$t('message.Pi_tip') as string,
- // content: this.$t('message.Pi_tip5') as string,
- // confirmText: this.$t('message.workArea_Confirm') as string,
- // showCancel: false,
- // success: () => {
- // // uni.navigateBack({ delta: 2 });
- // },
- // });
+ const dataList: any = [];
+ //获取选中的列表
+ this.model.aggregateList.forEach((item: any) => {
+ if (item.checked === true) {
+ dataList.push(item);
+ }
+ });
+ //判断选中的列表是否为空
+ if (dataList.length == 0) {
+ uni.showToast({
+ icon: "none",
+ title: "请先选中要提交的数据" as string,
+ });
+ return;
+ }
+ //判断选中的数据中 是否存在没分配库位的数据
+ let isTrue: boolean = true;
+ dataList.forEach((item: any) => {
+ if (item.wlList == null || item.wlList.length == 0) {
+ uni.showToast({
+ icon: "none",
+ title: "请确保所选数据都已分配库位" as string,
+ });
+ isTrue = false;
+ }
+ });
+ if (isTrue == true) {
+ const params = {
+ factoryCode: session.factoryCode,
+ loginName: session.loginName,
+ dataList,
+ includeOrderOutIdList,
+ };
+ await this.model.saveAggregateUpload(params);
+ }
}
/**
diff --git a/src/pages/raw/handover/picking/total.vue b/src/pages/raw/handover/picking/total.vue
index 4e6bb67..ef6a32e 100644
--- a/src/pages/raw/handover/picking/total.vue
+++ b/src/pages/raw/handover/picking/total.vue
@@ -138,19 +138,19 @@ export default class RawReceiptDetail extends BasePage {
});
let ant: any = sessionStorage.getItem("mater");
this.material = JSON.parse(ant);
- this.number = this.material.requestAmount;
+ console.log("this.material", this.material);
+ this.number = this.material.amount;
sessionStorage.removeItem("mater");
- if (this.material.hasOwnProperty("wllist")) {
- this.material.wllist.forEach((item: any) => {
+ if (this.material.hasOwnProperty("wlList")) {
+ this.material.wlList.forEach((item: any) => {
let arr: object = {
value: item.wlCode,
};
let obj: any = {
value: arr,
- num: item.receiptAmount,
+ num: item.qty,
};
this.LocationList.push(obj as never);
- console.log("this.LocationList", this.LocationList);
});
}
}
@@ -178,70 +178,67 @@ export default class RawReceiptDetail extends BasePage {
});
return;
}
- if (item.value.sendSpot == this.wlCode.sendSpot) {
- let num: number = 0;
- this.LocationList.forEach((item: any) => {
- num += parseFloat(item.num);
- });
- num += parseFloat(this.number);
- if (num > parseFloat(this.material.requestAmount)) {
- uni.showToast({
- icon: "none",
- title: "实际数量不能大于需求数量",
- });
- return;
- }
- let arr: object = {
- value: this.wlCode,
- num: this.number,
- };
- this.LocationList.push(arr as never);
- this.material.receiptAmount = num;
- this.number = "";
- return;
- }
});
- }
- if (this.LocationList.length == 0) {
- if (this.number > this.material.requestAmount) {
- uni.showToast({
- icon: "none",
- title: "实际数量不能大于需求数量",
- });
- return;
- }
+ let num: number = 0;
+ this.LocationList.forEach((item: any) => {
+ num += parseFloat(item.num);
+ });
+ num += parseFloat(this.number);
+ // if (num > parseFloat(this.material.amount)) {
+ // uni.showToast({
+ // icon: "none",
+ // title: "实际数量不能大于需求数量",
+ // });
+ // return;
+ // }
let arr: object = {
value: this.wlCode,
num: this.number,
};
this.LocationList.push(arr as never);
- this.material.receiptAmount = this.number;
+ this.material.currentAmount = num;
+ this.number = "";
+ return;
+ }
+ if (this.LocationList.length == 0) {
+ // if (this.number > this.material.amount) {
+ // uni.showToast({
+ // icon: "none",
+ // title: "实际数量不能大于需求数量",
+ // });
+ // return;
+ // }
+ let arr: object = {
+ value: this.wlCode,
+ num: this.number,
+ };
+ this.LocationList.push(arr as never);
+ this.material.currentAmount = this.number;
this.number = "";
return;
}
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
- console.log("this.LocationList", this.LocationList);
}
bookTypeChange(e: any) {
this.wlCode = e.pickerName;
}
Reservoir() {
- let wllist: Array = [];
+ let wlList: Array = [];
let requestAmountNum = 0;
this.LocationList.forEach((item: any) => {
let objString = JSON.stringify(this.material);
let TEM = JSON.parse(objString);
TEM.wlCode = item.value.label;
- TEM.receiptAmount = item.num;
- wllist.push(TEM);
+ TEM.qty = item.num;
+ wlList.push(TEM);
let pras = parseInt(item.num);
requestAmountNum += pras;
});
- console.log("wllist", wllist);
- this.material.wllist = null;
- this.material.wllist = wllist;
+ console.log("wlList", wlList);
+ this.material.wlList = null;
+ this.material.wlList = wlList;
this.material.receiptAmount = requestAmountNum;
sessionStorage.setItem("material", JSON.stringify(this.material));
this.redirectTo(this.page.raw.handover.picking.summary);
diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue
index 8487007..dac7241 100644
--- a/src/pages/raw/handover/returning/index.vue
+++ b/src/pages/raw/handover/returning/index.vue
@@ -1,17 +1,33 @@
-
@@ -87,18 +146,23 @@
diff --git a/src/pages/raw/ingoods/dnReceipt/idetailed.vue b/src/pages/raw/ingoods/dnReceipt/idetailed.vue
index 62e1411..ab6ad3b 100644
--- a/src/pages/raw/ingoods/dnReceipt/idetailed.vue
+++ b/src/pages/raw/ingoods/dnReceipt/idetailed.vue
@@ -141,6 +141,7 @@ export default class RawReceiptDetail extends BasePage {
this.material = JSON.parse(ant);
this.number = this.material.requestAmount;
sessionStorage.removeItem("mater");
+ localStorage.removeItem("sendSpot");
if (this.material.hasOwnProperty("wllist")) {
this.material.wllist.forEach((item: any) => {
let arr: object = {
@@ -178,38 +179,36 @@ export default class RawReceiptDetail extends BasePage {
});
return;
}
- if (item.value.sendSpot == this.wlCode.sendSpot) {
- let num: number = 0;
- this.LocationList.forEach((item: any) => {
- num += parseFloat(item.num);
- });
- num += parseFloat(this.number);
- if (num > parseFloat(this.material.requestAmount)) {
- uni.showToast({
- icon: "none",
- title: "实际数量不能大于需求数量",
- });
- return;
- }
- let arr: object = {
- value: this.wlCode,
- num: this.number,
- };
- this.LocationList.push(arr as never);
- this.material.receiptAmount = num;
- this.number = "";
- return;
- }
});
+ let num: number = 0;
+ this.LocationList.forEach((item: any) => {
+ num += parseFloat(item.num);
+ });
+ num += parseFloat(this.number);
+ // if (num > parseFloat(this.material.requestAmount)) {
+ // uni.showToast({
+ // icon: "none",
+ // title: "实际数量不能大于需求数量",
+ // });
+ // return;
+ // }
+ let arr: object = {
+ value: this.wlCode,
+ num: this.number,
+ };
+ this.LocationList.push(arr as never);
+ this.material.receiptAmount = num;
+ this.number = "";
+ return;
}
if (this.LocationList.length == 0) {
- if (this.number > this.material.requestAmount) {
- uni.showToast({
- icon: "none",
- title: "实际数量不能大于需求数量",
- });
- return;
- }
+ // if (this.number > this.material.requestAmount) {
+ // uni.showToast({
+ // icon: "none",
+ // title: "实际数量不能大于需求数量",
+ // });
+ // return;
+ // }
let arr: object = {
value: this.wlCode,
num: this.number,
diff --git a/src/pages/raw/ingoods/dnReceipt/index.vue b/src/pages/raw/ingoods/dnReceipt/index.vue
index 2211b0a..edd2aaa 100644
--- a/src/pages/raw/ingoods/dnReceipt/index.vue
+++ b/src/pages/raw/ingoods/dnReceipt/index.vue
@@ -162,6 +162,7 @@ export default class dnReceiptDom extends BasePage {
JSON.stringify(this.form.documentNo) as any
);
this.toPage(this.page.raw.ingoods.dnReceipt.detail);
+ // this.toPage(this.page.raw.ingoods.dnReceipt.Receiving);
});
}
}
@@ -226,8 +227,5 @@ export default class dnReceiptDom extends BasePage {
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
-
- .button-bar {
- }
}
diff --git a/src/pages/raw/ingoods/dnReceipt/model.ts b/src/pages/raw/ingoods/dnReceipt/model.ts
index 6c9f4b2..2b1f09e 100644
--- a/src/pages/raw/ingoods/dnReceipt/model.ts
+++ b/src/pages/raw/ingoods/dnReceipt/model.ts
@@ -157,6 +157,7 @@ export class ReceiptModule extends VuexModule {
// orderInInfoList.forEach((item: any) => {
// item.receiptAmount = item.requestAmount;
// });
+ localStorage.setItem("list", JSON.stringify(list) as any);
localStorage.setItem("sendSpot", JSON.stringify(list[0].sendSpot) as any);
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx };
}
@@ -165,11 +166,11 @@ export class ReceiptModule extends VuexModule {
* 提交看单明细
*/
@MutationAction
- async submitOrderInEnter() {
- const list = (this.state as any).orderInInfoList.map((item: any) => {
- item.orderStatus = item.checked ? "2" : "1";
- return item;
- });
+ async submitOrderInEnter(list: any) {
+ // const list = (this.state as any).orderInInfoList.map((item: any) => {
+ // // item.orderStatus = item.checked ? "2" : "1";
+ // return item;
+ // });
const result: any = await http.post(url.material.DNorderin.enter, {
dnNo: this.dnNo,
factoryCode: session.factoryCode,
diff --git a/src/pages/raw/ingoods/dnReturnGoods/detail.vue b/src/pages/raw/ingoods/dnReturnGoods/detail.vue
index bc5f395..1b70308 100644
--- a/src/pages/raw/ingoods/dnReturnGoods/detail.vue
+++ b/src/pages/raw/ingoods/dnReturnGoods/detail.vue
@@ -90,6 +90,9 @@ export default class RawReceiptDetail extends BasePage {
let index: any = JSON.parse(sessionStorage.getItem("index") as string);
this.model.orderInInfoList[index] = ant;
console.log(this.model.orderInInfoList);
+ // this.$nextTick(() => {
+ // this.toPage(this.page.raw.ingoods.dnReturnGoods.detail);
+ // });
}
gohome() {
this.toPage(this.page.raw.ingoods.dnReturnGoods.index);
diff --git a/src/pages/raw/ingoods/dnReturnGoods/index.vue b/src/pages/raw/ingoods/dnReturnGoods/index.vue
index 031185c..f18ddc0 100644
--- a/src/pages/raw/ingoods/dnReturnGoods/index.vue
+++ b/src/pages/raw/ingoods/dnReturnGoods/index.vue
@@ -157,7 +157,7 @@ export default class dnReturnGoodsDom extends BasePage {
});
return;
}
- this.toPage(this.page.raw.ingoods.dnReturnGoods.detail);
+ this.toPage(this.page.raw.ingoods.dnReturnGoods.location);
});
}
}
diff --git a/src/pages/raw/ingoods/dnReturnGoods/model.ts b/src/pages/raw/ingoods/dnReturnGoods/model.ts
index 29a6ea6..eb75562 100644
--- a/src/pages/raw/ingoods/dnReturnGoods/model.ts
+++ b/src/pages/raw/ingoods/dnReturnGoods/model.ts
@@ -5,11 +5,11 @@ import {
Mutation,
MutationAction,
VuexModule,
-} from 'vuex-module-decorators';
-import store from '@/store';
-import http from '@/utils/request';
-import { url } from '@/utils/url';
-import { session } from '@/store/modules/session';
+} from "vuex-module-decorators";
+import store from "@/store";
+import http from "@/utils/request";
+import { url } from "@/utils/url";
+import { session } from "@/store/modules/session";
class OrderInInfo {
checked?: boolean;
@@ -28,7 +28,7 @@ class OrderInInfo {
namespaced: true,
dynamic: true,
store,
- name: 'raw.ingoods.dnReturnGoods',
+ name: "raw.ingoods.dnReturnGoods",
})
export class ReceiptModule extends VuexModule {
/**
@@ -38,7 +38,7 @@ export class ReceiptModule extends VuexModule {
/**
* 隐藏看单号
*/
- dnNo = '';
+ dnNo = "";
/**
* 看单号查询结果
*/
@@ -140,12 +140,16 @@ export class ReceiptModule extends VuexModule {
loginName: session.loginName,
});
const orderInInfo = list[0] || {};
- const orderInInfoList = list.filter((_: OrderInInfo) => _.userDefined10 === '1');
- const orderInInfoListEx = list.filter((_: OrderInInfo) => _.userDefined10 === '0');
+ const orderInInfoList = list.filter(
+ (_: OrderInInfo) => _.userDefined10 === "1"
+ );
+ const orderInInfoListEx = list.filter(
+ (_: OrderInInfo) => _.userDefined10 === "0"
+ );
orderInInfoList.forEach((item: any) => {
item.returnAmount = item.requestAmount;
});
- console.log('1111111', orderInInfoList);
+ console.log("1111111", orderInInfoList);
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx };
}
@@ -154,11 +158,12 @@ export class ReceiptModule extends VuexModule {
*/
@MutationAction
async submitOrderInEnter() {
- const list = (this.state as any).orderInInfoList.map((item: any) => {
- item.orderStatus = item.checked ? '2' : '1';
- item.requestAmount = item.checked ? item.y : '0';
- return item;
- });
+ // const list = (this.state as any).orderInInfoList.map((item: any) => {
+ // item.orderStatus = item.checked ? '2' : '1';
+ // item.requestAmount = item.checked ? item.y : '0';
+ // return item;
+ // });
+ const list = (this.state as any).orderInInfoList;
const result: any = await http.post(url.material.DNorderin.out, {
dnNo: this.dnNo,
factoryCode: session.factoryCode,
@@ -166,11 +171,12 @@ export class ReceiptModule extends VuexModule {
list,
});
uni.showToast({
- icon: 'none',
+ icon: "none",
title: result.msg,
});
const orderInInfoList = result.list.sort(
- (a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus),
+ (a: any, b: any) =>
+ Number(a.accountingStatus) - Number(b.accountingStatus)
);
return { orderInInfoList };
}
@@ -178,9 +184,9 @@ export class ReceiptModule extends VuexModule {
/**
* 修改库位
*/
- @Action({ commit: 'updateCheckedOrderInInfoListKw' })
+ @Action({ commit: "updateCheckedOrderInInfoListKw" })
async changeOrderInLocation(kw: string) {
- await http.post('/material/orderin/enter', {
+ await http.post("/material/orderin/enter", {
warehouseCode: session.warehouseCode,
factoryCode: session.factoryCode,
loginName: session.loginName,
@@ -188,6 +194,15 @@ export class ReceiptModule extends VuexModule {
});
return kw;
}
+
+ @Action({ commit: "updateCheckedOrderInInfoListKw" })
+ async queryByFactoryCodeAndWorkAreaCode(content: any) {
+ let res = await http.post(
+ "/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
+ content
+ );
+ return res;
+ }
}
export default getModule(ReceiptModule);
diff --git a/src/pages/raw/ingoods/index.vue b/src/pages/raw/ingoods/index.vue
index 4757774..6064944 100644
--- a/src/pages/raw/ingoods/index.vue
+++ b/src/pages/raw/ingoods/index.vue
@@ -4,7 +4,7 @@
- {{ $t('message.rawMenu_ReceivingGoods') }}
+ {{ $t("message.rawMenu_ReceivingGoods") }}
@@ -20,13 +20,15 @@
{{
- session.lang == 'en'
- ? index + 1 + ' ' + item.engResourceName
- : index + 1 + ' ' + item.resourceName
+ session.lang == "en"
+ ? index + 1 + " " + item.engResourceName
+ : index + 1 + " " + item.resourceName
}}
+ DN收货
+ PO收货