diff --git a/src/pages.json b/src/pages.json index e6d0af1..015d5e8 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1351,6 +1351,62 @@ "navigationStyle": "custom", // 隐藏系统导航栏 "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } + }, + { + "path": "pages/raw/handover/RUS-aggregating/index", + "style": { + "navigationBarTitleText": "汇总查询", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-aggregating/result", + "style": { + "navigationBarTitleText": "汇总交接", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-aggregating/summary", + "style": { + "navigationBarTitleText": "汇总交接", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-aggregating/order", + "style": { + "navigationBarTitleText": "按单交接", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-virtual/index", + "style": { + "navigationBarTitleText": "虚拟单交接", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-virtual/result", + "style": { + "navigationBarTitleText": "虚拟单明细", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-virtual/summary", + "style": { + "navigationBarTitleText": "虚拟单交接-确认", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } } ], "globalStyle": { diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index 75292c4..12b1d3f 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -171,7 +171,7 @@ export default class LoginPage extends BasePage { console.log('......', server.serverAddress); if (server.serverAddress.includes('https://eurmom.haier.net')) { //修改俄罗斯版本号 - this.Version = '1.1.17'; + this.Version = '1.1.18'; } else { this.Version = '1.0.46'; } diff --git a/src/pages/raw/handover/RUS-aggregating/config.ts b/src/pages/raw/handover/RUS-aggregating/config.ts new file mode 100644 index 0000000..266d77a --- /dev/null +++ b/src/pages/raw/handover/RUS-aggregating/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/RUS-aggregating/index.vue b/src/pages/raw/handover/RUS-aggregating/index.vue new file mode 100644 index 0000000..6e7ef64 --- /dev/null +++ b/src/pages/raw/handover/RUS-aggregating/index.vue @@ -0,0 +1,371 @@ + + + diff --git a/src/pages/raw/handover/RUS-aggregating/model.ts b/src/pages/raw/handover/RUS-aggregating/model.ts new file mode 100644 index 0000000..90b05e6 --- /dev/null +++ b/src/pages/raw/handover/RUS-aggregating/model.ts @@ -0,0 +1,328 @@ +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.RUS-aggregating', +}) +export class AggregatingModule extends VuexModule { + /** + * 查询列表 + */ + proOrderList = []; + param: any; + orderOutIdListParams: any; + SubmitCode: any = ''; + /** + * 查询结果列表 + */ + proOrderResultList = []; + isFormChange: any; + CategoryList: 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 }; + } + //查询目标库位 + @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 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/RUS-aggregating/order.vue b/src/pages/raw/handover/RUS-aggregating/order.vue new file mode 100644 index 0000000..457eb75 --- /dev/null +++ b/src/pages/raw/handover/RUS-aggregating/order.vue @@ -0,0 +1,414 @@ + + + + + diff --git a/src/pages/raw/handover/RUS-aggregating/result.vue b/src/pages/raw/handover/RUS-aggregating/result.vue new file mode 100644 index 0000000..af7afef --- /dev/null +++ b/src/pages/raw/handover/RUS-aggregating/result.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/pages/raw/handover/RUS-aggregating/summary.vue b/src/pages/raw/handover/RUS-aggregating/summary.vue new file mode 100644 index 0000000..6cca695 --- /dev/null +++ b/src/pages/raw/handover/RUS-aggregating/summary.vue @@ -0,0 +1,462 @@ + + + + + diff --git a/src/pages/raw/handover/RUS-returning/index.vue b/src/pages/raw/handover/RUS-returning/index.vue index b4dac8f..24d2def 100644 --- a/src/pages/raw/handover/RUS-returning/index.vue +++ b/src/pages/raw/handover/RUS-returning/index.vue @@ -67,16 +67,16 @@ - + - + @@ -221,7 +221,7 @@ export default class returningDom extends BasePage { this.LocationList[this.LocationList.length - 1].barcode = this.Container.barcode; this.LocationList[this.LocationList.length - 1].wlCode = this.wlCode.label; this.LocationList[this.LocationList.length - 1].operator = this.operator; - this.LocationList[this.LocationList.length - 1].rfPwd = this.rfPwd; + // this.LocationList[this.LocationList.length - 1].rfPwd = this.rfPwd; this.LocationList[this.LocationList.length - 1].loginName = this.operator; this.LocationList[this.LocationList.length - 1].operatorPass = this.operator; this.LocationList[this.LocationList.length - 1].wkposCode = this.wlCode.sendSpot; diff --git a/src/pages/raw/handover/RUS-returning/model.ts b/src/pages/raw/handover/RUS-returning/model.ts index ffca46c..f1837ae 100644 --- a/src/pages/raw/handover/RUS-returning/model.ts +++ b/src/pages/raw/handover/RUS-returning/model.ts @@ -2,7 +2,7 @@ import { Action, getModule, Module, MutationAction, VuexModule } from 'vuex-modu import store from '@/store'; import http from '@/utils/request'; import { url } from '@/utils/url'; -import { auth } from '@/store/modules/auth'; +// import { auth } from '@/store/modules/auth'; import { session } from '@/store/modules/session'; class OrderInInfo { @@ -91,11 +91,11 @@ export class ReturningModule extends VuexModule { @Action async tluSubmit(params: any) { console.log(params); - await auth.checkPassword({ - factoryCode: session.factoryCode as string, - loginName: params[0].operator, - rfPwd: params[0].rfPwd, - }); + // await auth.checkPassword({ + // factoryCode: session.factoryCode as string, + // loginName: params[0].operator, + // rfPwd: params[0].rfPwd, + // }); await http.post(url.tl.uRussia, params); uni.showToast({ //icon: "success", diff --git a/src/pages/raw/handover/RUS-virtual/config.ts b/src/pages/raw/handover/RUS-virtual/config.ts new file mode 100644 index 0000000..d7fe190 --- /dev/null +++ b/src/pages/raw/handover/RUS-virtual/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/RUS-virtual/index.vue b/src/pages/raw/handover/RUS-virtual/index.vue new file mode 100644 index 0000000..81c70ce --- /dev/null +++ b/src/pages/raw/handover/RUS-virtual/index.vue @@ -0,0 +1,336 @@ + + + + + diff --git a/src/pages/raw/handover/RUS-virtual/model.ts b/src/pages/raw/handover/RUS-virtual/model.ts new file mode 100644 index 0000000..2fcd21b --- /dev/null +++ b/src/pages/raw/handover/RUS-virtual/model.ts @@ -0,0 +1,184 @@ +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.RUS-virtual', +}) +export class VirtualModule extends VuexModule { + /** + * sap 工厂代码 + */ + sapFactoryCode = ''; + nextQueryParams: any = {}; + CategoryList: any = []; + + /** + * 查询列表 + */ + proOrderList = []; + + /** + * 查询结果列表 + */ + 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); + } +} + +export default getModule(VirtualModule); diff --git a/src/pages/raw/handover/RUS-virtual/result.vue b/src/pages/raw/handover/RUS-virtual/result.vue new file mode 100644 index 0000000..c5e0ea6 --- /dev/null +++ b/src/pages/raw/handover/RUS-virtual/result.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/pages/raw/handover/RUS-virtual/summary.vue b/src/pages/raw/handover/RUS-virtual/summary.vue new file mode 100644 index 0000000..8213ce2 --- /dev/null +++ b/src/pages/raw/handover/RUS-virtual/summary.vue @@ -0,0 +1,411 @@ + + + + + diff --git a/src/pages/raw/handover/feeding/RUS-Location.vue b/src/pages/raw/handover/feeding/RUS-Location.vue index 1387be6..71b1359 100644 --- a/src/pages/raw/handover/feeding/RUS-Location.vue +++ b/src/pages/raw/handover/feeding/RUS-Location.vue @@ -91,16 +91,16 @@ - + - +
diff --git a/src/pages/raw/handover/feeding/model.ts b/src/pages/raw/handover/feeding/model.ts index c26f163..b827590 100644 --- a/src/pages/raw/handover/feeding/model.ts +++ b/src/pages/raw/handover/feeding/model.ts @@ -224,11 +224,11 @@ export class FeedingModule extends VuexModule { //俄罗斯补料提交 @Action({ commit: 'clearState' }) async saveBlDetailSubmit(params: any) { - await auth.checkPassword({ - factoryCode: session.factoryCode as string, - loginName: params.operatorPass as string, - rfPwd: params.rfPwd, - }); + // await auth.checkPassword({ + // factoryCode: session.factoryCode as string, + // loginName: params.operatorPass as string, + // rfPwd: params.rfPwd, + // }); await http.post(url.bl.uRussia, { factoryCode: session.factoryCode, loginName: session.loginName, diff --git a/src/utils/page.ts b/src/utils/page.ts index 0472338..cba6627 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -115,11 +115,23 @@ export const page = { summary: '/pages/raw/handover/aggregating/summary', accessory: '/pages/raw/handover/aggregating/accessory', }, + RUSaggregating: { + index: '/pages/raw/handover/RUS-aggregating/index', + result: '/pages/raw/handover/RUS-aggregating/result', + order: '/pages/raw/handover/RUS-aggregating/order', + summary: '/pages/raw/handover/RUS-aggregating/summary', + // accessory: '/pages/raw/handover/aggregating/accessory', + }, virtual: { index: '/pages/raw/handover/virtual/index', result: '/pages/raw/handover/virtual/result', summary: '/pages/raw/handover/virtual/summary', }, + RUSvirtual: { + index: '/pages/raw/handover/RUS-virtual/index', + result: '/pages/raw/handover/RUS-virtual/result', + summary: '/pages/raw/handover/RUS-virtual/summary', + }, feeVirtualReplenishmentding: { Location: '/pages/raw/handover/feeVirtualReplenishmentding/Location', Local: '/pages/raw/handover/feeVirtualReplenishmentding/Local-details',