From 0226abe3640d6da3601a8cf4d495304e5ca98102 Mon Sep 17 00:00:00 2001 From: mabaoyan Date: Thu, 11 May 2023 14:14:28 +0800 Subject: [PATCH 1/5] =?UTF-8?q?Hdsmesin-54=20feat=20=E6=8B=A3=E9=85=8D?= =?UTF-8?q?=E4=BA=A4=E6=8E=A5=E8=B7=AF=E7=94=B1=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/cn.ts | 2 ++ src/i18n/lang/en.ts | 2 ++ src/pages.json | 16 ++++++++++++++++ src/utils/page.ts | 6 ++++++ 4 files changed, 26 insertions(+) diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index d621f80..19ff8c7 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -568,5 +568,7 @@ export default { HeaderText: '备注', supplierCode: '供应商编码', supplierName: '供应商名称', + PickingVn: '拣配-越南', + HandoverVn: '交接-越南', }, }; diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 7de4c45..9015fea 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -570,5 +570,7 @@ export default { spSo: 'Spare So', supplierCode: 'supplier code', supplierName: 'supplier', + PickingVn: 'Picking-Vn', + HandoverVn: 'Handover-Vn', }, }; diff --git a/src/pages.json b/src/pages.json index ef14c5d..cf34096 100644 --- a/src/pages.json +++ b/src/pages.json @@ -482,6 +482,22 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/handover/picking-vn/index",// 越南工厂 + "style": { + "navigationBarTitleText": "拣配", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/aggregating-vn/index",// 越南工厂 + "style": { + "navigationBarTitleText": "汇总查询", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/raw/handover/picking/index", "style": { diff --git a/src/utils/page.ts b/src/utils/page.ts index 42c927b..4a092c2 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -89,6 +89,9 @@ export const page = { Local: '/pages/raw/handover/picking/Local-details', SummaryLocal: '/pages/raw/handover/picking/Summary-details', }, + pickingVn: { + index: '/pages/raw/handover/picking-vn/index', + }, RUSpicking: { index: '/pages/raw/handover/RUS-picking/index', result: '/pages/raw/handover/RUS-picking/result', @@ -116,6 +119,9 @@ export const page = { summary: '/pages/raw/handover/aggregating/summary', accessory: '/pages/raw/handover/aggregating/accessory', }, + aggregatingVn: { + index: '/pages/raw/handover/aggregating-vn/index', + }, RUSaggregating: { index: '/pages/raw/handover/RUS-aggregating/index', result: '/pages/raw/handover/RUS-aggregating/result', From 0023eb9ed6086b6b3eaaedb1922f686e987a6e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=AD=90=E5=B0=A7?= Date: Thu, 11 May 2023 19:54:00 +0800 Subject: [PATCH 2/5] =?UTF-8?q?overseamom-235=20fix=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2vnpages=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 4b4746d3f4cc0ccb1216ed989e10b3cdb4c1a943) --- .../raw/handover/aggregating-vn/ByOrder.vue | 441 ++++++++++++++ .../raw/handover/aggregating-vn/accessory.vue | 326 +++++++++++ .../raw/handover/aggregating-vn/config.ts | 221 +++++++ .../raw/handover/aggregating-vn/index.vue | 355 ++++++++++++ .../raw/handover/aggregating-vn/model.ts | 312 ++++++++++ .../raw/handover/aggregating-vn/order.vue | 414 ++++++++++++++ .../raw/handover/aggregating-vn/result.vue | 177 ++++++ .../raw/handover/aggregating-vn/summary.vue | 462 +++++++++++++++ src/pages/raw/handover/picking-vn/ByOrder.vue | 541 ++++++++++++++++++ .../raw/handover/picking-vn/BySummary.vue | 526 +++++++++++++++++ .../raw/handover/picking-vn/Local-details.vue | 74 +++ .../handover/picking-vn/Summary-details.vue | 114 ++++ src/pages/raw/handover/picking-vn/config.ts | 287 ++++++++++ .../raw/handover/picking-vn/idetailed.vue | 356 ++++++++++++ src/pages/raw/handover/picking-vn/index.vue | 326 +++++++++++ src/pages/raw/handover/picking-vn/model.ts | 410 +++++++++++++ src/pages/raw/handover/picking-vn/order.vue | 329 +++++++++++ src/pages/raw/handover/picking-vn/query.vue | 208 +++++++ src/pages/raw/handover/picking-vn/result.vue | 142 +++++ src/pages/raw/handover/picking-vn/summary.vue | 331 +++++++++++ src/pages/raw/handover/picking-vn/total.vue | 369 ++++++++++++ 21 files changed, 6721 insertions(+) create mode 100644 src/pages/raw/handover/aggregating-vn/ByOrder.vue create mode 100644 src/pages/raw/handover/aggregating-vn/accessory.vue create mode 100644 src/pages/raw/handover/aggregating-vn/config.ts create mode 100644 src/pages/raw/handover/aggregating-vn/index.vue create mode 100644 src/pages/raw/handover/aggregating-vn/model.ts create mode 100644 src/pages/raw/handover/aggregating-vn/order.vue create mode 100644 src/pages/raw/handover/aggregating-vn/result.vue create mode 100644 src/pages/raw/handover/aggregating-vn/summary.vue create mode 100644 src/pages/raw/handover/picking-vn/ByOrder.vue create mode 100644 src/pages/raw/handover/picking-vn/BySummary.vue create mode 100644 src/pages/raw/handover/picking-vn/Local-details.vue create mode 100644 src/pages/raw/handover/picking-vn/Summary-details.vue create mode 100644 src/pages/raw/handover/picking-vn/config.ts create mode 100644 src/pages/raw/handover/picking-vn/idetailed.vue create mode 100644 src/pages/raw/handover/picking-vn/index.vue create mode 100644 src/pages/raw/handover/picking-vn/model.ts create mode 100644 src/pages/raw/handover/picking-vn/order.vue create mode 100644 src/pages/raw/handover/picking-vn/query.vue create mode 100644 src/pages/raw/handover/picking-vn/result.vue create mode 100644 src/pages/raw/handover/picking-vn/summary.vue create mode 100644 src/pages/raw/handover/picking-vn/total.vue diff --git a/src/pages/raw/handover/aggregating-vn/ByOrder.vue b/src/pages/raw/handover/aggregating-vn/ByOrder.vue new file mode 100644 index 0000000..660bc33 --- /dev/null +++ b/src/pages/raw/handover/aggregating-vn/ByOrder.vue @@ -0,0 +1,441 @@ + + + + + diff --git a/src/pages/raw/handover/aggregating-vn/accessory.vue b/src/pages/raw/handover/aggregating-vn/accessory.vue new file mode 100644 index 0000000..5b3ba7a --- /dev/null +++ b/src/pages/raw/handover/aggregating-vn/accessory.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/pages/raw/handover/aggregating-vn/config.ts b/src/pages/raw/handover/aggregating-vn/config.ts new file mode 100644 index 0000000..266d77a --- /dev/null +++ b/src/pages/raw/handover/aggregating-vn/config.ts @@ -0,0 +1,221 @@ +/** + * 汇总查询表格列 + */ +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_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', + }, + { + 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.Summary_QuantityOfThisHandover'), + key: 'hvAmount', + }, + // { + // 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.po_DemandQuantity'), + key: 'amount', + }, + { + 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.Summary_FinishedProductMaterialNumber'), + key: 'prdMaterialCode', + }, + { + label: vm.$t('message.po_Location'), + key: 'wkposCode', + }, +]; + +/** + * 按单查询结果表格列 + */ +export const orderHeaders = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 220, + }, + { + label: vm.$t('message.Summary_QuantityOfThisHandover'), + key: 'hvAmount', + }, + // { + // 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.po_DemandQuantity'), + key: 'amount', + }, + { + 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.po_Location'), + key: 'wkposCode', + }, + { + label: vm.$t('message.product_FGCode'), + key: 'prodCode', //成品编码 + }, + { + label: vm.$t('message.Pi_FinishedProductModel'), + key: 'prodDesc', //成品型号 + width: 300, + }, +]; diff --git a/src/pages/raw/handover/aggregating-vn/index.vue b/src/pages/raw/handover/aggregating-vn/index.vue new file mode 100644 index 0000000..3a74349 --- /dev/null +++ b/src/pages/raw/handover/aggregating-vn/index.vue @@ -0,0 +1,355 @@ + + + diff --git a/src/pages/raw/handover/aggregating-vn/model.ts b/src/pages/raw/handover/aggregating-vn/model.ts new file mode 100644 index 0000000..b339325 --- /dev/null +++ b/src/pages/raw/handover/aggregating-vn/model.ts @@ -0,0 +1,312 @@ +import { getModule, Module, Mutation, 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'; +import vm from '@/main'; +@Module({ + namespaced: true, + dynamic: true, + store, + name: 'raw.handover.aggregating', +}) +export class AggregatingModule extends VuexModule { + /** + * 查询列表 + */ + proOrderList = []; + param: any; + orderOutIdListParams: any; + SubmitCode: any = ''; + /** + * 查询结果列表 + */ + proOrderResultList = []; + isFormChange: any; + + /** + * 查询结果汇总列表 + */ + aggregateList: any[] = []; + + /** + * 查询结果按单列表 + */ + orderList: any[] = []; + + /** + * 查询结果辅料列表 + */ + accessoryList: any[] = []; + lockCode: 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); + } + + /** + * 清空查询结果列表 + */ + @Mutation + clearProOrderResultList() { + this.proOrderResultList = []; + } + /** + * 查询列表 + */ + @Mutation + clearProOrderList() { + this.proOrderList = []; + } + + /** + * 全选/取消全选汇总列表 + * @param checked + */ + @Mutation + checkAllAggregateList(checked: boolean) { + this.aggregateList.map((item: any) => { + Object.assign(item, { checked, hvAmount: (checked && item.totalMoAmount - item.totalHvAmount) || 0 }); + }); + } + /** + * 全选/取消按单列表 + * @param checked + */ + @Mutation + checkAllOrderList(checked: boolean) { + this.orderList.map((item: any) => { + Object.assign(item, { checked, hvAmount: (checked && item.totalMoAmount - item.totalHvAmount) || 0 }); + }); + } + /** + * 列表提交-汇总交接 + * @param params + */ + @MutationAction + async uploadAggregateList(params: any) { + const result: any = await http.post(url.sumscan.u.hzlist, params); + const SubmitCode = result.code; + console.log('yayayyayyayayayyayyayayayyay', SubmitCode); + uni.showToast({ + //icon: 'success', + title: 'success', + duration: 2000, + image: '/static/icons/icon-51.png', + }); + return { SubmitCode }; + } + + /** + * 设置汇总列表项本次交接数量 + * @param params + */ + @Mutation + setAggregateListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) { + this.aggregateList[index].hvAmount = hvAmount; + // this.aggregateList.splice(index, 1, newItem); + // if (this.aggregateList[index].checked) { + // this.aggregateList[index].hvAmount = this.aggregateList[index].totalMoAmount - this.aggregateList[index].totalHvAmount; + // } else { + // this.aggregateList[index].hvAmount = 0; + // } + } + + /** + * 设置按单列表项本次交接数量 + * @param params + */ + @Mutation + setOrderListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) { + // this.orderList.splice(index, 1, newItem); + this.orderList[index].hvAmount = hvAmount; + } + // setOrderListItemHvAmount() { + // this.orderList + // .filter((_: any) => _.checked) + // .forEach((item: any) => { + // item.hvAmount = item.totalMoAmount - item.totalHvAmount; + // // if (params.hvAmount) { + // // item.currentAmount = params.hvAmount; + // // } + // }); + // } + + /** + * 设置辅料列表项本次交接数量 + * @param params + */ + @Mutation + setAccessoryListItemHvAmount({ index, hvAmount }: { index: number; hvAmount: number }) { + const original = this.accessoryList[index]; + const newItem = { ...original, hvAmount }; + this.accessoryList.splice(index, 1, newItem); + } + /** + * 汇总列表是否全选 + */ + get isAggregateCheckedAll() { + return !this.aggregateList.filter((_: any) => !_.checked).length; + } + /** + * 按单列表是否全选 + */ + get isOrderCheckedAll() { + return !this.orderList.filter((_: any) => !_.checked).length; + } + /** + * 全选/取消全选查询列表 + * @param checked + */ + @Mutation + checkAllProOrderList(checked: boolean) { + this.proOrderList = this.proOrderList.map((item: any) => ({ + ...item, + checked, + })); + } + + /** + * 查询看单号 + * @param params + */ + @MutationAction + async queryProOrder(params: any) { + const { list: proOrderList }: any = await http.post(url.sumscan.query.orderno, params); + //const proOrderList = values.map((v: string) => ({ prdOrder, amount: v, materialCode: v, materialDesc: v })); + //const proOrderList = values; + //console.log(">>>>>?????proOrderList",proOrderList); + proOrderList.forEach((_: any) => (_.checked = true)); + if (!proOrderList.length) { + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + 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.sumscan.query.ordoutlist, params); + return { proOrderResultList }; + } + + /** + * 查询结果-汇总列表 + * @param params + */ + @MutationAction + async queryAggregateList(params: any) { + const { list: aggregateList }: any = await http.post(url.sumscan.query.hzlist, params); + if (!aggregateList.length) { + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); + return { aggregateList }; + } + console.log('aggregateList', aggregateList); + return { aggregateList }; + } + + /** + * 查询结果-按单列表 + * @param params + */ + @MutationAction + async queryOrderList(params: any) { + const { queryParams, proOrderResultList } = params; + await http.post(url.sumscan.lock.list, queryParams); + const orderList = cloneDeep(proOrderResultList); + orderList.map((item: any) => { + Object.assign(item, { checked: false }); + }); + return { orderList }; + } + @MutationAction + async lock(params: any) { + const res: any = await http.post(url.sortscan.lock.list, params); + const lockCode = res.code; + return { lockCode }; + } + /** + * 查询结果-辅料列表 + * @param params + */ + @MutationAction + async queryAccessoryList(params: any) { + const { list: accessoryList }: any = await http.post(url.sumscan.query.fllist, params); + if (!accessoryList.length) { + // uni.showToast({ + // icon: 'none', + // title: 'No Data Found!', + // }); + vm.customToast(vm.$t('message.Pi_NoDataFound') as any); + } + return { accessoryList }; + } + + /** + * 列表提交-按单交接 + * @param params + */ + @MutationAction + async uploadOrderList(params: any) { + const result: any = await http.post(url.sumscan.u.order, params); + const SubmitCode = result.code; + console.log('yayayyayyayayayyayyayayayyay', SubmitCode); + uni.showToast({ + //icon: 'success', + title: 'success', + duration: 2000, + image: '/static/icons/icon-51.png', + }); + return { SubmitCode }; + } + + /** + * 列表提交-辅料交接 + * @param params + */ + @Action + async uploadAccessoryList(params: any) { + return http.post(url.sumscan.u.fllist, params); + } + + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async queryByFactoryCodeAndWorkAreaCode(content: any) { + const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); + return res; + } +} + +export default getModule(AggregatingModule); diff --git a/src/pages/raw/handover/aggregating-vn/order.vue b/src/pages/raw/handover/aggregating-vn/order.vue new file mode 100644 index 0000000..d784a62 --- /dev/null +++ b/src/pages/raw/handover/aggregating-vn/order.vue @@ -0,0 +1,414 @@ + + + + + diff --git a/src/pages/raw/handover/aggregating-vn/result.vue b/src/pages/raw/handover/aggregating-vn/result.vue new file mode 100644 index 0000000..949e159 --- /dev/null +++ b/src/pages/raw/handover/aggregating-vn/result.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/pages/raw/handover/aggregating-vn/summary.vue b/src/pages/raw/handover/aggregating-vn/summary.vue new file mode 100644 index 0000000..c138e30 --- /dev/null +++ b/src/pages/raw/handover/aggregating-vn/summary.vue @@ -0,0 +1,462 @@ + + + + + diff --git a/src/pages/raw/handover/picking-vn/ByOrder.vue b/src/pages/raw/handover/picking-vn/ByOrder.vue new file mode 100644 index 0000000..cda64e6 --- /dev/null +++ b/src/pages/raw/handover/picking-vn/ByOrder.vue @@ -0,0 +1,541 @@ + + + + diff --git a/src/pages/raw/handover/picking-vn/BySummary.vue b/src/pages/raw/handover/picking-vn/BySummary.vue new file mode 100644 index 0000000..cb9e879 --- /dev/null +++ b/src/pages/raw/handover/picking-vn/BySummary.vue @@ -0,0 +1,526 @@ + + + + diff --git a/src/pages/raw/handover/picking-vn/Local-details.vue b/src/pages/raw/handover/picking-vn/Local-details.vue new file mode 100644 index 0000000..6522f10 --- /dev/null +++ b/src/pages/raw/handover/picking-vn/Local-details.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/pages/raw/handover/picking-vn/Summary-details.vue b/src/pages/raw/handover/picking-vn/Summary-details.vue new file mode 100644 index 0000000..5956e47 --- /dev/null +++ b/src/pages/raw/handover/picking-vn/Summary-details.vue @@ -0,0 +1,114 @@ + + + diff --git a/src/pages/raw/handover/picking-vn/config.ts b/src/pages/raw/handover/picking-vn/config.ts new file mode 100644 index 0000000..28ea9cf --- /dev/null +++ b/src/pages/raw/handover/picking-vn/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/picking-vn/idetailed.vue b/src/pages/raw/handover/picking-vn/idetailed.vue new file mode 100644 index 0000000..69fa7a1 --- /dev/null +++ b/src/pages/raw/handover/picking-vn/idetailed.vue @@ -0,0 +1,356 @@ + + + + + diff --git a/src/pages/raw/handover/picking-vn/index.vue b/src/pages/raw/handover/picking-vn/index.vue new file mode 100644 index 0000000..05ff5ca --- /dev/null +++ b/src/pages/raw/handover/picking-vn/index.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/pages/raw/handover/picking-vn/model.ts b/src/pages/raw/handover/picking-vn/model.ts new file mode 100644 index 0000000..1a95c58 --- /dev/null +++ b/src/pages/raw/handover/picking-vn/model.ts @@ -0,0 +1,410 @@ +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 = ''; + + /** + * 查询结果列表(按单列表) + */ + 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 }; + } + /** + * 上传汇总列表 + */ + // @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/picking-vn/order.vue b/src/pages/raw/handover/picking-vn/order.vue new file mode 100644 index 0000000..9c7848e --- /dev/null +++ b/src/pages/raw/handover/picking-vn/order.vue @@ -0,0 +1,329 @@ + + + + + diff --git a/src/pages/raw/handover/picking-vn/query.vue b/src/pages/raw/handover/picking-vn/query.vue new file mode 100644 index 0000000..d422992 --- /dev/null +++ b/src/pages/raw/handover/picking-vn/query.vue @@ -0,0 +1,208 @@ + + + + + diff --git a/src/pages/raw/handover/picking-vn/result.vue b/src/pages/raw/handover/picking-vn/result.vue new file mode 100644 index 0000000..748f60a --- /dev/null +++ b/src/pages/raw/handover/picking-vn/result.vue @@ -0,0 +1,142 @@ + + + diff --git a/src/pages/raw/handover/picking-vn/summary.vue b/src/pages/raw/handover/picking-vn/summary.vue new file mode 100644 index 0000000..243d9c1 --- /dev/null +++ b/src/pages/raw/handover/picking-vn/summary.vue @@ -0,0 +1,331 @@ + + + + + diff --git a/src/pages/raw/handover/picking-vn/total.vue b/src/pages/raw/handover/picking-vn/total.vue new file mode 100644 index 0000000..a2c650a --- /dev/null +++ b/src/pages/raw/handover/picking-vn/total.vue @@ -0,0 +1,369 @@ + + + + + From d55bdfe6eec0188a4089287e236805242a34720e Mon Sep 17 00:00:00 2001 From: mabaoyan Date: Fri, 19 May 2023 10:07:17 +0800 Subject: [PATCH 3/5] =?UTF-8?q?overseamom-252=20feat=20=E6=89=8B=E6=8C=81?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0sto=E8=AF=A6=E6=83=85=E9=A1=B5=E5=92=8C?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/cn.ts | 3 + src/i18n/lang/en.ts | 4 + src/i18n/lang/ru.ts | 3 + src/pages.json | 8 ++ src/pages/product/stoOutbound/config.ts | 37 +++++++ src/pages/product/stoOutbound/detail.vue | 126 +++++++++++++++++++++++ src/pages/product/stoOutbound/index.vue | 107 +++++++++++++++++-- src/pages/product/stoOutbound/model.ts | 49 +++++++-- src/utils/page.ts | 3 + src/utils/url.ts | 4 + 10 files changed, 328 insertions(+), 16 deletions(-) create mode 100644 src/pages/product/stoOutbound/config.ts create mode 100644 src/pages/product/stoOutbound/detail.vue diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 19ff8c7..966d9a3 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -570,5 +570,8 @@ export default { supplierName: '供应商名称', PickingVn: '拣配-越南', HandoverVn: '交接-越南', + detail: '详情', + pcNo:'批次号', + stoPcPleaseInput: '请输入批次号', }, }; diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 9015fea..27ab3a8 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -572,5 +572,9 @@ export default { supplierName: 'supplier', PickingVn: 'Picking-Vn', HandoverVn: 'Handover-Vn', + detail: 'Detail', + pcNo:'Batch No', + stoPcPleaseInput: 'Please input batch No', + }, }; diff --git a/src/i18n/lang/ru.ts b/src/i18n/lang/ru.ts index 75beaa9..623bd1a 100644 --- a/src/i18n/lang/ru.ts +++ b/src/i18n/lang/ru.ts @@ -567,5 +567,8 @@ export default { HeaderText: 'Примечания', supplierCode: 'Код поставщика', supplierName: 'Название поставщика', + detail: 'Detail', + pcNo:'Batch No', + stoPcPleaseInput: 'Please input batch No', }, }; diff --git a/src/pages.json b/src/pages.json index cf34096..983e14a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1338,6 +1338,14 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/product/stoOutbound/detail", + "style": { + "navigationBarTitleText": "成品STO出库",//成品sto出库(越南按照sto单号出库) + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/demo/index", "style": { diff --git a/src/pages/product/stoOutbound/config.ts b/src/pages/product/stoOutbound/config.ts new file mode 100644 index 0000000..49f33b4 --- /dev/null +++ b/src/pages/product/stoOutbound/config.ts @@ -0,0 +1,37 @@ +/** + * 扫描明细表格列 + */ +import vm from '@/main'; +export const headers = [ + { + label: vm.$t('message.product_BarCode'), + key: 'barcode', + width: 400, + }, + { + label: vm.$t('message.pcNo'), + key: 'pcNo', + width: 400, + }, + { + label: vm.$t('message.po_MaterielNo'), + key: 'matCode', + width: 300, + }, + { + label: vm.$t('message.po_MaterielDes'), + key: 'matDesc', + width: 400, + }, + { + label: vm.$t('message.stoOrderNo'), + key: 'stoNo', + width: 300, + }, + { + label: vm.$t('message.stoLine'), + key: 'stoItem', + width: 300, + }, +]; + diff --git a/src/pages/product/stoOutbound/detail.vue b/src/pages/product/stoOutbound/detail.vue new file mode 100644 index 0000000..7720d62 --- /dev/null +++ b/src/pages/product/stoOutbound/detail.vue @@ -0,0 +1,126 @@ + + + + diff --git a/src/pages/product/stoOutbound/index.vue b/src/pages/product/stoOutbound/index.vue index 6036f60..f61cdde 100644 --- a/src/pages/product/stoOutbound/index.vue +++ b/src/pages/product/stoOutbound/index.vue @@ -58,7 +58,7 @@ - + @@ -70,6 +70,17 @@ + + + + + + + + + + + - + + {{ $t('message.detail') }} + + {{ $t('message.confirm') }} - - {{ $t('message.po_Return') }} + + {{ $t('message.po_Return') }} + + + {{ $t('message.Cancel') }} @@ -124,8 +141,10 @@ export default class dnReceiptDom extends BasePage { ItemIndex: any = ''; carNo: any = ''; company: any = ''; + pcNo: any = ''; showVehicle = false; showMsg = false; + showCancel = false; title = 'Please Enter Msg'; async query() { @@ -133,6 +152,8 @@ export default class dnReceiptDom extends BasePage { this.company = ''; this.showVehicle = false; this.showMsg = false; + this.pcNo = ''; + this.showCancel = false; if (!this.stoNo) { this.customToast(this.$t('message.stoPleaseInput') as any); return; @@ -154,6 +175,9 @@ export default class dnReceiptDom extends BasePage { this.ItemIndex = index; } }); + } + async SelectPcLine(e: any) { + this.pcNo = e.pickerName; } //num: any = ''; //SunmitList: any = []; @@ -162,6 +186,7 @@ export default class dnReceiptDom extends BasePage { this.company = ''; this.showVehicle = false; this.showMsg = false; + this.showCancel = false; //如果为空,则进入 if (!this.stoNo) { this.customToast(this.$t('message.stoPleaseInput') as any); @@ -191,13 +216,32 @@ export default class dnReceiptDom extends BasePage { this.barcode = ''; } } - - //确认 +/** + * 详情 + */ + async Detail() { + const params = { + factoryCode: session.factoryCode, + loginName: session.loginName, + stoNo: this.stoNo, + }; + await this.model.QueryStoDetail(params); + uni.setStorageSync('factory', JSON.stringify(params) as any); + this.toPage(this.page.product.stoOutbound.datile); + } + //确认弹窗 async Confirm() { if (!this.stoNo) { this.customToast(this.$t('message.stoPleaseInput') as any); return; } + } + //确认 + async ConfirmDo() { + if (!this.stoNo) { + this.customToast(this.$t('message.stoPleaseInput') as any); + return; + } if (this.carNo == '' || this.company == '') { this.showVehicle = true; this.showMsg = true; @@ -227,6 +271,52 @@ export default class dnReceiptDom extends BasePage { this.emptyMsg(); } } + + //批次取消打开弹窗 + async Cancel() { + console.log("11111111"); + if (!this.stoNo) { + //this.customToast(this.$t('message.stoPleaseInput') as any); + return; + } + const SunmitList = { + loginName: session.loginName, + factoryCode: session.factoryCode, + stoNo: this.stoNo, + }; + await this.model.QueryPcList(SunmitList); + this.showCancel = true; + } + + //批次取消 + async CancelDo() { + if (!this.pcNo) { + this.customToast(this.$t('message.stoPcPleaseInput') as any); + return; + } + console.log("222222222"); + const SunmitList = { + loginName: session.loginName, + factoryCode: session.factoryCode, + stoNo: this.stoNo, + pcNo: this.pcNo, + }; + await this.model.stoCancel(SunmitList); + if (this.model.SubCode == 1) { + uni.showToast({ + title: this.$t('message.success') as string, + image: '/static/icons/icon-51.png', + }); + this.pcNo = ''; + //不生效 + this.empty(); + } else { + this.pcNo = ''; + //不生效 + this.emptyMsg(); + } + } + //过账 async Submit() { if (!this.stoNo) { @@ -260,6 +350,8 @@ export default class dnReceiptDom extends BasePage { this.company = ''; this.showVehicle = false; this.showMsg = false; + this.pcNo = ''; + this.showCancel=false; //this.SunmitList = []; this.model.stoNoList.length = 0; } @@ -267,6 +359,9 @@ export default class dnReceiptDom extends BasePage { this.carNo = ''; this.company = ''; this.showMsg = false; + this.pcNo = ''; + this.showCancel=false; + console.log("ccccccan"); } } diff --git a/src/pages/product/stoOutbound/model.ts b/src/pages/product/stoOutbound/model.ts index 8960eb0..9fac133 100644 --- a/src/pages/product/stoOutbound/model.ts +++ b/src/pages/product/stoOutbound/model.ts @@ -1,13 +1,4 @@ -/* - * @Author: zhou lei - * @Date: 2022-10-10 15:40:04 - * @LastEditTime: 2022-10-12 11:35:25 - * @LastEditors: zhou lei - * @Description: - * @FilePath: \hgwms-factory-app\src\pages\product\STO-Outbound\model.ts - * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司 - */ -import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators'; +import { getModule,Action, Module, MutationAction, VuexModule } from 'vuex-module-decorators'; import store from '@/store'; import http from '@/utils/request'; import { url } from '@/utils/url'; @@ -22,6 +13,8 @@ export class ReceiptModule extends VuexModule { //越南 STO出库 扫描DN单号 stoNoList: any = []; stoItemList: any = []; + stoPcList: any = []; + stoBarcodeList: any = []; res: any = ''; @MutationAction async QuerySto(stoNo: any) { @@ -85,6 +78,42 @@ export class ReceiptModule extends VuexModule { const SubCode = res.code; return { SubCode }; } + + //查询sto未过账的批次集合 + @MutationAction + async QueryPcList(content: any) { + const res: any = await http.post(url.outbound.stoOutbound.pcListQuery, content); + const stoPcList = res.data; + return {stoPcList}; + } + + //越南 批次取消 + CancelCode: any = ''; + @MutationAction + async stoCancel(list: any) { + const res: any = await http.post(url.outbound.stoOutbound.stoCancel, list); + const CancelCode = res.code; + return { CancelCode }; + } + + //越南 条码删除 + DeleteCode: any = ''; + @MutationAction + async deleteBarcode(list: any) { + const res: any = await http.post(url.outbound.stoOutbound.stoDelete, list); + const DeleteCode = res.code; + return { DeleteCode }; + } + + //查询sto扫描条码明细 + @MutationAction + async QueryStoDetail(content: any) { + const res: any = await http.post(url.outbound.stoOutbound.stoDetailQuery, content); + const stoBarcodeList = res.data; + return {stoBarcodeList}; + } + + } export default getModule(ReceiptModule); diff --git a/src/utils/page.ts b/src/utils/page.ts index 4a092c2..2b72f62 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -34,6 +34,9 @@ export const page = { stoOutboundDetail: '/pages/product/outbound/stoOutbound/detail', stoBack: '/pages/product/STO-Outbound/Back', }, + stoOutbound:{ + datile:'/pages/product/stoOutbound/detail', + }, SpareDeliverGoods: { detail: '/pages/product/outbound/SpareDeliverGoods/detail', }, diff --git a/src/utils/url.ts b/src/utils/url.ts index 6a50271..ebcfa6d 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -186,6 +186,10 @@ export const url = { stoScan: '/wmspda/fg/stoOutbound/scan', stoConfirm: '/wmspda/fg/stoOutbound/confirm', stoPost: '/wmspda/fg/stoOutbound/post', + stoDetailQuery: '/wmspda/fg/stoOutbound/queryDetail', + pcListQuery: '/wmspda/fg/stoOutbound/queryPcNoList', + stoCancel: '/wmspda/fg/stoOutbound/cancel', + stoDelete: '/wmspda/fg/stoOutbound/delete', }, }, inbound: { From e3f15089a8ae8e597e5015a6011dbcbd98622c8b Mon Sep 17 00:00:00 2001 From: mabaoyan Date: Fri, 19 May 2023 17:52:27 +0800 Subject: [PATCH 4/5] =?UTF-8?q?overseamom-252=20feat=20sto=E6=89=8B?= =?UTF-8?q?=E6=8C=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/product/stoOutbound/detail.vue | 6 ++++- src/pages/product/stoOutbound/index.vue | 30 +++++++++++++++++------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/pages/product/stoOutbound/detail.vue b/src/pages/product/stoOutbound/detail.vue index 7720d62..c79f81e 100644 --- a/src/pages/product/stoOutbound/detail.vue +++ b/src/pages/product/stoOutbound/detail.vue @@ -55,13 +55,17 @@ export default class RawReceiptDetail extends BasePage { barcode: barcode, }; await this.model.deleteBarcode(SunmitList); - if (this.model.SubCode == 1) { + if (this.model.DeleteCode == 1) { + let index = this.model.stoBarcodeList.findIndex(val=>val.barcode==barcode); + this.model.stoBarcodeList.splice(index,1); + this.seleteData=[]; uni.showToast({ title: this.$t('message.success') as string, image: '/static/icons/icon-51.png', }); this.seleteData={}; } + // await this.model.QueryStoDetail } } diff --git a/src/pages/product/stoOutbound/index.vue b/src/pages/product/stoOutbound/index.vue index f61cdde..bde8291 100644 --- a/src/pages/product/stoOutbound/index.vue +++ b/src/pages/product/stoOutbound/index.vue @@ -72,14 +72,15 @@ - + - + +