From e553ee10fb9f7971fd36d50cdd70ef867e3603f3 Mon Sep 17 00:00:00 2001 From: guoshuang Date: Fri, 17 Jun 2022 17:23:15 +0800 Subject: [PATCH] =?UTF-8?q?cosmoim-852=20fix=20=E4=BF=84=E7=BD=97=E6=96=AF?= =?UTF-8?q?=E6=8B=A3=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 50 +- .../raw/handover/RUS-picking/ByOrder.vue | 566 +++++++++++++++++ .../raw/handover/RUS-picking/BySummary.vue | 590 ++++++++++++++++++ .../handover/RUS-picking/Local-details.vue | 74 +++ .../handover/RUS-picking/Summary-details.vue | 114 ++++ src/pages/raw/handover/RUS-picking/config.ts | 287 +++++++++ src/pages/raw/handover/RUS-picking/index.vue | 311 +++++++++ src/pages/raw/handover/RUS-picking/model.ts | 423 +++++++++++++ src/pages/raw/handover/RUS-picking/result.vue | 142 +++++ src/utils/page.ts | 8 + 10 files changed, 2564 insertions(+), 1 deletion(-) create mode 100644 src/pages/raw/handover/RUS-picking/ByOrder.vue create mode 100644 src/pages/raw/handover/RUS-picking/BySummary.vue create mode 100644 src/pages/raw/handover/RUS-picking/Local-details.vue create mode 100644 src/pages/raw/handover/RUS-picking/Summary-details.vue create mode 100644 src/pages/raw/handover/RUS-picking/config.ts create mode 100644 src/pages/raw/handover/RUS-picking/index.vue create mode 100644 src/pages/raw/handover/RUS-picking/model.ts create mode 100644 src/pages/raw/handover/RUS-picking/result.vue diff --git a/src/pages.json b/src/pages.json index 99ba264..73754c6 100644 --- a/src/pages.json +++ b/src/pages.json @@ -898,6 +898,54 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/handover/RUS-picking/index", + "style": { + "navigationBarTitleText": "拣配查询", //俄罗斯拣配首页面 + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-picking/ByOrder", + "style": { + "navigationBarTitleText": "拣配查询", //俄罗斯按单拣配页面 + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-picking/BySummary", + "style": { + "navigationBarTitleText": "拣配查询", //俄罗斯汇总拣配页面 + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-picking/result", + "style": { + "navigationBarTitleText": "拣配查询结果", //俄罗斯拣配查询结果页 + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-picking/Local-details", + "style": { + "navigationBarTitleText": "本地DN收货明细", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-picking/Summary-details", + "style": { + "navigationBarTitleText": "本地DN收货明细", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/demo/index", "style": { @@ -911,4 +959,4 @@ "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" } -} +} \ No newline at end of file diff --git a/src/pages/raw/handover/RUS-picking/ByOrder.vue b/src/pages/raw/handover/RUS-picking/ByOrder.vue new file mode 100644 index 0000000..c8bef9b --- /dev/null +++ b/src/pages/raw/handover/RUS-picking/ByOrder.vue @@ -0,0 +1,566 @@ + + + + diff --git a/src/pages/raw/handover/RUS-picking/BySummary.vue b/src/pages/raw/handover/RUS-picking/BySummary.vue new file mode 100644 index 0000000..bed2fe5 --- /dev/null +++ b/src/pages/raw/handover/RUS-picking/BySummary.vue @@ -0,0 +1,590 @@ + + + + diff --git a/src/pages/raw/handover/RUS-picking/Local-details.vue b/src/pages/raw/handover/RUS-picking/Local-details.vue new file mode 100644 index 0000000..6522f10 --- /dev/null +++ b/src/pages/raw/handover/RUS-picking/Local-details.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/pages/raw/handover/RUS-picking/Summary-details.vue b/src/pages/raw/handover/RUS-picking/Summary-details.vue new file mode 100644 index 0000000..5956e47 --- /dev/null +++ b/src/pages/raw/handover/RUS-picking/Summary-details.vue @@ -0,0 +1,114 @@ + + + diff --git a/src/pages/raw/handover/RUS-picking/config.ts b/src/pages/raw/handover/RUS-picking/config.ts new file mode 100644 index 0000000..28ea9cf --- /dev/null +++ b/src/pages/raw/handover/RUS-picking/config.ts @@ -0,0 +1,287 @@ +/** + * 拣配查询表格列 + */ +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, + }, + { + label: vm.$t('message.Summary_ProductionDate'), + key: 'requireDate', //生产日期 + width: 300, + }, + { + label: vm.$t('message.product_FGCode'), + key: 'prodCode', //成品编码 + }, + { + label: vm.$t('message.Pi_FinishedProductModel'), + key: 'prodDesc', //成品型号 + 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_factory'), + key: 'sapFactoryCode', + }, + { + 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: 'prdMaterialDesc', + // width: 300, + // }, + { + label: vm.$t('message.po_Location'), + key: 'wkposCode', + }, + { + label: vm.$t('message.product_FGCode'), + key: 'prodCode', //成品编码 + }, + { + label: vm.$t('message.Pi_FinishedProductModel'), + key: 'prodDesc', //成品型号 + width: 300, + }, +]; + +/** + * 汇总拣配表格列 + */ +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.shortage'), + key: 'differences', + }, + { + label: vm.$t('message.Pi_CurrentPickingQuantity'), + key: 'currentAmount', + width: 300, + }, + { + label: vm.$t('message.Pi_PickedQuantity'), + key: 'totalMoAmount', + }, + { + label: vm.$t('message.Pi_QuantityHandedOver'), + key: 'totalHvAmount', + }, + { + label: vm.$t('message.po_Location'), + // key: 'currentWkposCode', + key: 'wkposCode', + }, + { + label: vm.$t('message.po_MaterielDes'), + key: 'materialDesc', + width: 350, + }, + { + label: vm.$t('message.Pi_unit'), + key: 'unit', + }, + { + label: vm.$t('message.target'), + key: 'sendSpot', + // width: 300, + }, + // { + // label: '工位', + // key: 'sendSpot', + // }, + // { + // label: '工厂', + // key: 'sapFactoryCode', + // }, +]; + +/** + * 按单拣配表格列 + */ +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.shortage'), + key: 'differences', + }, + { + label: vm.$t('message.Pi_CurrentPickingQuantity'), + key: 'currentAmount', + width: 300, + }, + { + label: vm.$t('message.Pi_PickedQuantity'), + key: 'totalMoAmount', + }, + { + label: vm.$t('message.Pi_QuantityHandedOver'), + key: 'totalHvAmount', + }, + { + label: vm.$t('message.target'), + // key: 'currentWkposCode', + //key: 'wkposCode', + key: 'sendSpot', + }, + { + label: vm.$t('message.po_MaterielDes'), + key: 'materialDesc', + width: 350, + }, + { + label: vm.$t('message.Pi_unit'), + key: 'unit', + }, + { + label: vm.$t('message.Pi_FinishedProductModel'), + key: 'prdMaterialDesc', + width: 300, + }, + { + label: vm.$t('message.Pi_factory'), + key: 'sapFactoryCode', + }, + { + label: vm.$t('message.Pi_Station'), + //key: 'sendSpot', + key: 'wkposCode', + }, + { + label: vm.$t('message.Pi_OrderNo'), + key: 'prdOrder', + }, + { + label: vm.$t('message.product_FGCode'), + key: 'prodCode', //成品编码 + }, + { + label: vm.$t('message.Pi_FinishedProductModel'), + key: 'prodDesc', //成品型号 + width: 300, + }, +]; + +export const Headers = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 220, + }, + { + label: vm.$t('message.po_DemandQuantity'), + key: 'amount', + }, + { + label: vm.$t('message.Pi_CurrentPickingQuantity'), + key: 'operatorAmount', //本次拣配数量 + width: 300, + }, + { + label: vm.$t('message.po_Location'), + // key: 'currentWkposCode', + key: 'originLocation', + }, + { + label: vm.$t('message.po_MaterielDes'), + key: 'materialDesc', + width: 350, + }, + { + label: vm.$t('message.Pi_unit'), + key: 'unit', + }, + { + label: vm.$t('message.Pi_factory'), + key: 'sapFactoryCode', + }, + { + label: vm.$t('message.Pi_Station'), + key: 'sendSpot', + }, + { + label: vm.$t('message.Pi_OrderNo'), + key: 'prdOrder', + }, + { + label: vm.$t('message.CommissionedLocation'), + key: 'wlCode', + }, +]; diff --git a/src/pages/raw/handover/RUS-picking/index.vue b/src/pages/raw/handover/RUS-picking/index.vue new file mode 100644 index 0000000..614c7ed --- /dev/null +++ b/src/pages/raw/handover/RUS-picking/index.vue @@ -0,0 +1,311 @@ + + + + + diff --git a/src/pages/raw/handover/RUS-picking/model.ts b/src/pages/raw/handover/RUS-picking/model.ts new file mode 100644 index 0000000..4eae109 --- /dev/null +++ b/src/pages/raw/handover/RUS-picking/model.ts @@ -0,0 +1,423 @@ +import { Action, getModule, Module, Mutation, MutationAction, VuexModule } from 'vuex-module-decorators'; +import store from '@/store'; +import http from '@/utils/request'; +import { url } from '@/utils/url'; +import { session } from '@/store/modules/session'; +import vm from '@/main'; +@Module({ + namespaced: true, + dynamic: true, + store, + name: 'raw.handover.picking', +}) +export class PickingModule extends VuexModule { + /** + * 查询列表 + */ + proOrderList: any[] = []; + detailedList: any; + mrpCodeRegion: ''; + sapFactoryCode: ''; + formParams: ''; + code = ''; + orderOutIdList: any; + NEWparams: any; + LocList: any = []; + lockCode: any = ''; + // 容器码返回 + ContainerCode: any = ''; + + /** + * 查询结果列表(按单列表) + */ + proOrderResultList: any[] = []; + + /** + * 查询结果汇总列表 + */ + aggregateList: any[] = []; + + /** + * 库存地点列表 + */ + locationList = []; + + /** + * 是否全选 + */ + get isCheckedAll() { + return !this.proOrderList.filter((_: any) => !_.checked).length; + } + + /** + * 是否有选择项 + */ + get hasChecked() { + return this.checkedProOrderList.length > 0; + } + + /** + * 获取选中的查询列表 + */ + get checkedProOrderList() { + return this.proOrderList.filter((_: any) => _.checked); + } + + /** + * 汇总列表是否全选 + */ + get isAggregateCheckedAll() { + return !this.aggregateList.filter((_: any) => !_.checked).length; + } + + /** + * 汇总列表是否有选择项 + */ + get hasAggregateChecked() { + return this.checkedAggregateList.length > 0; + } + + /** + * 获取选中的汇总列表 + */ + get checkedAggregateList() { + return this.aggregateList.filter((_: any) => _.checked); + } + + /** + * 汇总列表中是否有本次拣配数量 + */ + get hasAggregateCurrentAmount() { + return this.aggregateList.findIndex((_: any) => _.currentAmount) > -1; + } + + /** + * 获取汇总上传列表数据 + */ + get aggregateUploadList() { + return this.aggregateList.map((item: any) => { + if (!item.checked) { + item.currentAmount = 0; + } + return item; + }); + } + + /** + * 结果列表是否全选 + */ + get isProOrderResultCheckedAll() { + return !this.proOrderResultList.filter((_: any) => !_.checked).length; + } + + /** + * 结果列表是否有选择项 + */ + get hasProOrderResultChecked() { + return this.checkedProOrderResultList.length > 0; + } + + /** + * 获取选中的结果列表 + */ + get checkedProOrderResultList() { + return this.proOrderResultList.filter((_: any) => _.checked); + } + + /** + * 结果列表中是否有本次拣配数量 + */ + get hasProOrderResultCurrentAmount() { + return this.proOrderResultList.findIndex((_: any) => _.currentAmount) > -1; + } + + /** + * 获取按单上传列表数据 + */ + get proOrderResultUploadList() { + return this.proOrderResultList.map((item: any) => { + if (!item.checked) { + item.currentAmount = 0; + } + return item; + }); + } + + /** + * 清理状态数据 + */ + @Mutation + clearState() { + this.proOrderList = []; + this.proOrderResultList = []; + this.aggregateList = []; + } + /** + * 查询列表 + */ + @Mutation + clearProOrderList() { + this.proOrderList = []; + } + + /** + * 全选/取消全选查询列表 + * @param checked + */ + @Mutation + checkAllProOrderList(checked: boolean) { + this.proOrderList = this.proOrderList.map((item: any) => ({ + ...item, + checked, + })); + } + + /** + * 全选/取消全选汇总列表 + * @param checked + */ + @Mutation + checkAllAggregateList(checked: boolean) { + this.aggregateList = this.aggregateList.map((item: any) => ({ + ...item, + checked, + })); + } + + /** + * 确认选中汇总列表 + * @param params + */ + @Mutation + confirmCheckedAggregateList(params: { locationCode: string; amount: number }) { + this.aggregateList + .filter((_: any) => _.checked) + .forEach((item: any) => { + if (params.locationCode) { + item.currentWkposCode = params.locationCode; + } + if (params.amount) { + item.currentAmount = params.amount; + } + }); + } + + /** + * 全选/取消全选按单列表 + * @param checked + */ + @Mutation + checkAllProOrderResultList(checked: boolean) { + this.proOrderResultList = this.proOrderResultList.map((item: any) => ({ + ...item, + checked, + })); + } + + /** + * 确认选中按单列表 + * @param params + */ + @Mutation + confirmCheckedProOrderResultList(params: { amount: number }) { + this.proOrderResultList + .filter((_: any) => _.checked) + .forEach((item: any) => { + // if (params.locationCode) { + // item.currentWkposCode = params.locationCode; + // } + if (params.amount) { + item.currentAmount = params.amount; + } + }); + } + + /** + * 查询看单号 + * @param params + */ + @MutationAction + async queryProOrder(params: any) { + const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, params); + if (!proOrderList.length) { + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); + } + return { proOrderList }; + } + @MutationAction + async queryOrder() { + const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams); + if (!proOrderList.length) { + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); + } + return { proOrderList }; + } + /** + * 查询库存 + * @param params + */ + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async queryStockList(params: any) { + const res: any = await http.post('/material/queryOdsRawStorageNews', params); + return res; + } + + /** + * 查询结果列表 + * @param params + */ + @MutationAction + async queryProOrderResult(params: any) { + const { list: proOrderResultList }: any = await http.post(url.sortscan.query.prdorderList, params); + proOrderResultList.forEach((item: any) => { + (item.loginName = params.loginName), (item.differences = parseFloat(item.amount) - parseFloat(item.totalMoAmount)); + }); + return { proOrderResultList }; + } + + /** + * 查询结果-汇总列表 + * @param params + */ + @MutationAction + async queryAggregateList(params: any) { + const { list: aggregateList }: any = await http.post(url.sortscan.query.aggregateList, params); + if (!aggregateList.length) { + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + // vm.customToast(vm.$t('message.Pi_NoDataFound') as any); + return; + } + aggregateList.forEach((item: any) => { + (item.loginName = params.loginName), (item.differences = parseFloat(item.amount) - parseFloat(item.totalMoAmount)); + }); + return { aggregateList }; + } + /** + * 查询库存地点列表 这里后期可能会改成url.auth.locations list相应得改成values 也不用item了 类型也改成string + */ + @MutationAction + async queryLocationList() { + const params = { + factoryCode: session.factoryCode, + loginName: session.loginName, + }; + const { values }: any = await http.post(url.auth.locations, params); + const locationList = values.map((value: string) => ({ + label: value, + value, + })); + return { locationList }; + } + @MutationAction + async lock(params: any) { + const res: any = await http.post(url.sortscan.lock.list, params); + const lockCode = res.code; + return { lockCode }; + } + //俄罗斯汇总拣配扫描容器码 + @MutationAction + async searchBarcode(barcode: any) { + const res: any = await http.post(url.auth.query.barcode, { + factoryCode: session.factoryCode, + loginName: session.loginName, + barcode, + }); + const ContainerCode = res.data; + return { ContainerCode }; + } + /** + * 上传汇总列表 + */ + // @Action({ commit: 'clearState' }) + @MutationAction + async saveAggregateUpload(params: any) { + const res: any = await http.post(url.sortscan.save.aggregate, params); + console.log('res', res); + const code = res.code; + return { code }; + } + + /** + * 上传按单列表 + */ + // @Action({ commit: 'clearState' }) + @MutationAction + async saveProOrderResultUpload(dataList: any[]) { + const res: any = await http.post(url.sortscan.save.order, dataList); + const code = res.code; + console.log('code', code); + return { code }; + } + @MutationAction + async queryItemLoc(params: any = {}) { + const res: any = await http.post(url.sortscan.save.queryWlByMat, params); + const LocList = []; + res.forEach((item: any) => { + const arr: any = { + label: item.locationCode, + value: item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')', + }; + LocList.push(arr); + }); + console.log('res', res); + console.log('LocList', LocList); + return { LocList }; + } + /** + * 解锁数据 + * @param list + */ + @Action + async unlockProOrderResult(list: any[]) { + try { + await http.post(url.sortscan.unlock.list, list, { + custom: { hideError: true }, + } as any); + } catch { + // + } + } + @Action + async unlockAggregateResult(params: any) { + try { + await http.post(url.sortscan.unlock.aggregateList, params); + } catch { + // + } + } + /** + * 锁定数据 + * @param list + */ + @Action + async lockProOrderResult(list: any[]) { + await http.post(url.sortscan.lock.list, list); + } + + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async queryByFactoryCodeAndWorkAreaCode(content: any) { + const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); + return res; + } + //查询拣配明细 + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async querydetaildlist(content: any) { + const res: any = await http.post('/wmspda/sortscan/getJhListSn', content); + this.detailedList = res.list; + console.log(this.detailedList); + return res; + } +} + +export default getModule(PickingModule); diff --git a/src/pages/raw/handover/RUS-picking/result.vue b/src/pages/raw/handover/RUS-picking/result.vue new file mode 100644 index 0000000..1f54493 --- /dev/null +++ b/src/pages/raw/handover/RUS-picking/result.vue @@ -0,0 +1,142 @@ + + + diff --git a/src/utils/page.ts b/src/utils/page.ts index 597276a..6bbeda7 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -88,6 +88,14 @@ export const page = { Local: '/pages/raw/handover/picking/Local-details', SummaryLocal: '/pages/raw/handover/picking/Summary-details', }, + RUSpicking: { + index: '/pages/raw/handover/RUS-picking/index', + result: '/pages/raw/handover/RUS-picking/result', + bysummary: '/pages/raw/handover/RUS-picking/BySummary', + byorder: '/pages/raw/handover/RUS-picking/ByOrder', + Local: '/pages/raw/handover/RUS-picking/Local-details', + SummaryLocal: '/pages/raw/handover/RUS-picking/Summary-details', + }, feeding: { index: '/pages/raw/handover/feeding/index', detail: '/pages/raw/handover/feeding/detail',