From d39c3d2513dbf051a4739d0167dc6f883aaae561 Mon Sep 17 00:00:00 2001 From: mabaoyan Date: Fri, 14 Jul 2023 15:41:47 +0800 Subject: [PATCH] =?UTF-8?q?overseamom-501=20feat=20=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E4=BA=A4=E6=8E=A5=E6=96=B0=E5=A2=9E=E6=89=8B=E6=8C=81=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= 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/i18n/lang/ru.ts | 1 + src/pages.json | 24 + src/pages/raw/handover/virtual-Vn/config.ts | 186 ++++++++ src/pages/raw/handover/virtual-Vn/index.vue | 350 +++++++++++++++ src/pages/raw/handover/virtual-Vn/model.ts | 204 +++++++++ src/pages/raw/handover/virtual-Vn/result.vue | 131 ++++++ src/pages/raw/handover/virtual-Vn/summary.vue | 411 ++++++++++++++++++ src/utils/page.ts | 5 + 10 files changed, 1314 insertions(+) create mode 100644 src/pages/raw/handover/virtual-Vn/config.ts create mode 100644 src/pages/raw/handover/virtual-Vn/index.vue create mode 100644 src/pages/raw/handover/virtual-Vn/model.ts create mode 100644 src/pages/raw/handover/virtual-Vn/result.vue create mode 100644 src/pages/raw/handover/virtual-Vn/summary.vue diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 65044bd..8043fd9 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -592,5 +592,6 @@ export default { boxnoscan: '请输入箱码', matscan: '请输入物料条码', bosnum: '顺序/数量', + virtualHandoverVn: '虚拟交接-越南', }, }; diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index f4f0b9d..eaf04e2 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -594,5 +594,6 @@ export default { boxnoscan: 'Please enter the box code', matscan: 'Please enter the material barcode', bosnum: 'Box No/All', + virtualHandoverVn: 'Virtual handover-Vn', }, }; diff --git a/src/i18n/lang/ru.ts b/src/i18n/lang/ru.ts index 983a24c..cb665e4 100644 --- a/src/i18n/lang/ru.ts +++ b/src/i18n/lang/ru.ts @@ -585,5 +585,6 @@ export default { boxnoscan: 'Введите код ящика', matscan: 'Введите штрих-код, пожалуйста', bosnum: 'Порядок/количество', + virtualHandoverVn: 'Virtual handover-Vn', }, }; diff --git a/src/pages.json b/src/pages.json index f6909d2..43b58cd 100644 --- a/src/pages.json +++ b/src/pages.json @@ -858,6 +858,30 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/handover/virtual-Vn/index", + "style": { + "navigationBarTitleText": "虚拟单交接",//越南 + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/virtual-Vn/result", + "style": { + "navigationBarTitleText": "虚拟单明细",//越南 + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/virtual-Vn/summary", + "style": { + "navigationBarTitleText": "虚拟单交接-确认",//越南 + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/login/login/index", "style": { diff --git a/src/pages/raw/handover/virtual-Vn/config.ts b/src/pages/raw/handover/virtual-Vn/config.ts new file mode 100644 index 0000000..d7fe190 --- /dev/null +++ b/src/pages/raw/handover/virtual-Vn/config.ts @@ -0,0 +1,186 @@ +/** + * 汇总查询表格列 + */ +import vm from '@/main'; +export const headers = [ + { + label: vm.$t('message.Pi_OrderNo'), + key: 'prdOrder', + width: 250, + }, + { + label: vm.$t('message.po_DemandQuantity'), + key: 'amount', + width: 255, + }, + { + label: vm.$t('message.Pi_materielNo'), + key: 'materialCode', + width: 250, + }, + { + label: vm.$t('message.CommissionedMaterielDesc'), + key: 'materialDesc', + width: 300, + }, +]; + +/** + * 汇总查询结果表格列 + */ +export const resultHeaders = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 220, + }, + { + label: vm.$t('message.po_DemandQuantity'), + key: 'amount', + }, + { + label: vm.$t('message.Pi_CumulativePickingQuantity'), + key: 'totalMoAmount', + width: 300, + }, + { + label: vm.$t('message.Pi_HandoverQuantity'), + key: 'totalHvAmount', + }, + { + label: vm.$t('message.Pi_Station'), + key: 'sendSpot', + }, + { + label: vm.$t('message.po_MaterielDes'), + key: 'materialDesc', + width: 350, + }, + { + label: 'MRP', + key: 'mrpCode', + }, + { + label: vm.$t('message.Pi_unit'), + key: 'unit', + }, + { + label: vm.$t('message.Pi_OrderNo'), + key: 'prdOrder', + }, + { + label: vm.$t('message.Pi_FinishedProductModel'), + key: 'proType', + }, + { + label: vm.$t('message.po_Location'), + key: 'wkposCode', + }, +]; + +/** + * 汇总交接查询结果表格列 + */ +export const summaryHeaders = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 220, + }, + { + label: vm.$t('message.po_DemandQuantity'), + key: 'amount', + }, + { + label: vm.$t('message.Summary_QuantityOfThisHandover'), + key: 'hvAmount', + width: 300, + }, + { + label: vm.$t('message.Pi_CumulativePickingQuantity'), + key: 'totalMoAmount', + width: 300, + }, + { + label: vm.$t('message.Pi_HandoverQuantity'), + key: 'totalHvAmount', + }, + { + label: vm.$t('message.Pi_Station'), + key: 'sendSpot', + }, + { + label: vm.$t('message.po_MaterielDes'), + key: 'materialDesc', + width: 350, + }, + { + label: vm.$t('message.Pi_unit'), + key: 'unit', + }, + { + label: vm.$t('message.po_Location'), + key: 'wkposCode', + }, + { + label: vm.$t('message.inventory'), + key: 'virtualAmount', + }, +]; + +/** + * 按单查询结果表格列 + */ +export const orderHeaders = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 220, + }, + { + label: vm.$t('message.po_DemandQuantity'), + key: 'amount', + }, + { + label: vm.$t('message.Summary_QuantityOfThisHandover'), + key: 'hvAmount', + }, + { + label: vm.$t('message.Pi_CumulativePickingQuantity'), + key: 'totalMoAmount', + width: 300, + }, + { + label: vm.$t('message.Pi_HandoverQuantity'), + key: 'totalHvAmount', + }, + { + label: vm.$t('message.Pi_Station'), + key: 'sendSpot', + }, + { + label: vm.$t('message.po_MaterielDes'), + key: 'materialDesc', + width: 350, + }, + { + label: vm.$t('message.Pi_unit'), + key: 'unit', + }, + { + label: 'MRP', + key: 'mrpCode', + }, + { + label: vm.$t('message.Pi_OrderNo'), + key: 'prdOrder', + }, + { + label: vm.$t('message.Pi_FinishedProductModel'), + key: 'proType', + }, + { + label: vm.$t('message.po_Location'), + key: 'wkposCode', + }, +]; diff --git a/src/pages/raw/handover/virtual-Vn/index.vue b/src/pages/raw/handover/virtual-Vn/index.vue new file mode 100644 index 0000000..e1aecbb --- /dev/null +++ b/src/pages/raw/handover/virtual-Vn/index.vue @@ -0,0 +1,350 @@ + + + + + diff --git a/src/pages/raw/handover/virtual-Vn/model.ts b/src/pages/raw/handover/virtual-Vn/model.ts new file mode 100644 index 0000000..0e9451e --- /dev/null +++ b/src/pages/raw/handover/virtual-Vn/model.ts @@ -0,0 +1,204 @@ +import { Action, getModule, Module, Mutation, MutationAction, VuexModule } from 'vuex-module-decorators'; +import store from '@/store'; +import http from '@/utils/request'; +import { url } from '@/utils/url'; +import vm from '@/main'; +export interface SummaryItem { + checked: any; + materialCode: string; + amount: number; + totalMoAmount: number; + totalHvAmount: number; + materialDesc: string; + unit: string; + wkposCode: string; + hvAmount: number; + prdMaterialDesc: string; + prdMaterialCode: string; + sapFactoryCode: string; + prdOrder: string; + sendSpot: string; + oriSendSpot: string; + mrpCode: string; +} + +@Module({ + namespaced: true, + dynamic: true, + store, + name: 'raw.handover.virtual', +}) +export class VirtualModule extends VuexModule { + /** + * sap 工厂代码 + */ + sapFactoryCode = ''; + nextQueryParams: any = {}; + CategoryList: any = []; + + /** + * 查询列表 + */ + proOrderList = []; + //mrp校验 + mrpcode: any = ''; + /** + * 查询结果列表 + */ + proOrderResultList = []; + + /** + * 汇总列表 + */ + summaryList: SummaryItem[] = []; + + /** + * 是否全选 + */ + get isCheckedAll() { + return !this.proOrderList.filter((_: any) => !_.checked).length; + } + + /** + * 是否有选择项 + */ + get hasChecked() { + return this.checkedProOrderList.length > 0; + } + + /** + * 获取选中的查询列表 + */ + get checkedProOrderList() { + return this.proOrderList.filter((_: any) => _.checked); + } + + /** + * 设置 sap 工厂代码 + */ + @Mutation + setSapFactoryCode(params: { sapFactoryCode: string }) { + this.sapFactoryCode = params.sapFactoryCode; + } + + /** + * 清空查询结果列表 + */ + @Mutation + clearProOrderResultList() { + this.proOrderResultList = []; + } + /** + * 保存查询条件 + */ + @MutationAction + async QueryParams(params: any) { + const nextQueryParams = params; + return { nextQueryParams }; + } + /** + * 查询列表 + */ + @Mutation + clearProOrderList() { + this.proOrderList = []; + } + /** + * 更新汇总列表项 + */ + @Mutation + updateSummaryItem({ index, newItem }: { index: number; newItem: SummaryItem }) { + this.summaryList.splice(index, 1, newItem); + } + + /** + * 查询看单号 + * @param params + */ + @MutationAction + async queryProOrder(params: any) { + const { list: proOrderList }: any = await http.post(url.virtual.query.orderno, params); + //const proOrderList = list.map((v: any) => ({ prdOrder: v.prdOrder, amount: v.amount, materialCode: v.materialCode, materialDesc: v.materialDesc })); + proOrderList.forEach((_: any) => (_.checked = true)); + if (!proOrderList.length) { + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); + } + return { proOrderList }; + } + + /** + * 查询结果列表 + * @param params + */ + @MutationAction + async queryProOrderResult(params: any) { + const { list: proOrderResultList }: any = await http.post(url.virtual.query.ordoutlist, params); + proOrderResultList.forEach((item: any) => { + item.hvAmount = 0; + }); + return { proOrderResultList }; + } + //查询目标库位 + @MutationAction + async getSendSpotList1(params: any = {}) { + const res: any = await http.post(url.sumscan.query.getSendSpotList, params); + const CategoryList = []; + res.data.forEach((item: any) => { + const arr: any = { + label: item.sendSpot, + value: item.sendSpot, + }; + CategoryList.push(arr); + }); + console.log('res', res); + console.log('LocList', CategoryList); + return { CategoryList }; + } + + /** + * 汇总-查询列表 + * @param params + */ + @MutationAction + async querySummaryList(params: any) { + const { list: summaryList }: any = await http.post(url.virtual.query.hzlist, params); + return { summaryList }; + } + + /** + * 汇总-检查数量 + */ + @Action + async checkAmount(params: { sapFactoryCode: string; loginName: string; materialCode: string; unit: string; mrpCode: string; factoryCode: string; sendSpot: string; amount: string }) { + return await http.post(url.virtual.check.amount, params); + } + + /** + * 汇总-上传结果 + */ + @Action + async uploadSummaryList(params: { sapFactoryCode: string; operatorPass: string; factoryCode: string; loginName: string; dataList: any[]; includeOrderOutIdList: string[] }) { + return await http.post(url.virtual.u.hzlist, params); + } + //获取MRP + @Action + async getMRP(params: any = {}) { + const res = await http.post(url.sortscan.save.queryMrpByUser, params); + // const code = res.code; + // const mrpdata = res.data; + // console.log('mrpdata', mrpdata); + return res; + } + /** + * mrp校验 + * @param params + */ + @MutationAction + async checkUserAndMrp(params: any) { + const res: any = await http.post(url.sortscan.save.checkUserAndMrp, params); + const mrpcode = res.code; + return { mrpcode }; + } +} + +export default getModule(VirtualModule); diff --git a/src/pages/raw/handover/virtual-Vn/result.vue b/src/pages/raw/handover/virtual-Vn/result.vue new file mode 100644 index 0000000..c78169f --- /dev/null +++ b/src/pages/raw/handover/virtual-Vn/result.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/pages/raw/handover/virtual-Vn/summary.vue b/src/pages/raw/handover/virtual-Vn/summary.vue new file mode 100644 index 0000000..2ff1dc1 --- /dev/null +++ b/src/pages/raw/handover/virtual-Vn/summary.vue @@ -0,0 +1,411 @@ + + + + + diff --git a/src/utils/page.ts b/src/utils/page.ts index efe7e49..d12f902 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -156,6 +156,11 @@ export const page = { result: '/pages/raw/handover/virtual/result', summary: '/pages/raw/handover/virtual/summary', }, + virtualVn: { + index: '/pages/raw/handover/virtual-Vn/index', + result: '/pages/raw/handover/virtual-Vn/result', + summary: '/pages/raw/handover/virtual-Vn/summary', + }, RUSvirtual: { index: '/pages/raw/handover/RUS-virtual/index', result: '/pages/raw/handover/RUS-virtual/result',