From e832ea8ba3c56d02adadd6d29eb36b724aec0689 Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Wed, 20 Jul 2022 18:05:38 +0800 Subject: [PATCH] =?UTF-8?q?cosmoim-852=20fix=20=E9=87=8D=E5=86=99=E4=BF=84?= =?UTF-8?q?=E7=BD=97=E6=96=AF=E6=9C=AC=E5=9C=B0DN=E6=94=B6=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 16 + .../raw/ingoods/RUS-dnReceipt/ImportDN.vue | 696 ++++++++++++++++ .../ingoods/RUS-dnReceipt/ImportPOReceive.vue | 229 ++++++ .../ingoods/RUS-dnReceipt/Local-details.vue | 83 ++ src/pages/raw/ingoods/RUS-dnReceipt/bill.vue | 97 +++ src/pages/raw/ingoods/RUS-dnReceipt/config.ts | 174 ++++ .../raw/ingoods/RUS-dnReceipt/detail-ex.vue | 125 +++ .../raw/ingoods/RUS-dnReceipt/detail.vue | 279 +++++++ .../raw/ingoods/RUS-dnReceipt/dnReceiving.vue | 772 ++++++++++++++++++ .../raw/ingoods/RUS-dnReceipt/idetailed.vue | 369 +++++++++ src/pages/raw/ingoods/RUS-dnReceipt/index.vue | 193 +++++ .../ingoods/RUS-dnReceipt/model.location.ts | 107 +++ src/pages/raw/ingoods/RUS-dnReceipt/model.ts | 303 +++++++ src/utils/url.ts | 1 + 14 files changed, 3444 insertions(+) create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/ImportDN.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/ImportPOReceive.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/Local-details.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/bill.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/config.ts create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/detail-ex.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/detail.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/dnReceiving.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/idetailed.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/index.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/model.location.ts create mode 100644 src/pages/raw/ingoods/RUS-dnReceipt/model.ts diff --git a/src/pages.json b/src/pages.json index 63a118f..ad1c54c 100644 --- a/src/pages.json +++ b/src/pages.json @@ -402,6 +402,22 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/ingoods/RUS-dnReceipt/dnReceiving", + "style": { + "navigationBarTitleText": "俄罗斯DN收货", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/ingoods/RUS-dnReceipt/Local-details", + "style": { + "navigationBarTitleText": "本地DN收货明细", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/raw/ingoods/dnReceipt/idetailed", "style": { diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/ImportDN.vue b/src/pages/raw/ingoods/RUS-dnReceipt/ImportDN.vue new file mode 100644 index 0000000..7bc69b1 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/ImportDN.vue @@ -0,0 +1,696 @@ + + + diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/ImportPOReceive.vue b/src/pages/raw/ingoods/RUS-dnReceipt/ImportPOReceive.vue new file mode 100644 index 0000000..e5796f0 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/ImportPOReceive.vue @@ -0,0 +1,229 @@ + + + diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/Local-details.vue b/src/pages/raw/ingoods/RUS-dnReceipt/Local-details.vue new file mode 100644 index 0000000..16d07c0 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/Local-details.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/bill.vue b/src/pages/raw/ingoods/RUS-dnReceipt/bill.vue new file mode 100644 index 0000000..8f9ac94 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/bill.vue @@ -0,0 +1,97 @@ + + + diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/config.ts b/src/pages/raw/ingoods/RUS-dnReceipt/config.ts new file mode 100644 index 0000000..67b2341 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/config.ts @@ -0,0 +1,174 @@ +/** + * 看单明细表格列 + */ +import vm from '@/main'; +export const headers = [ + { + label: vm.$t('message.Line'), + key: 'poLine', + }, + { + label: vm.$t('message.po_OddNumbers'), + key: 'poNo', + width: 350, + }, + { + label: vm.$t('message.Pi_materielNo'), + key: 'materialCode', + width: 350, + }, + { + label: vm.$t('message.CommissionedLocation'), + key: 'wlCode', + }, + { + label: vm.$t('message.product_Number'), + key: 'receiptAmount', + }, + { + label: vm.$t('message.Container'), + key: 'palletCode', //容器码 + width: 700, + }, + // { + // label: vm.$t('message.po_RemainingQuantity'), + // key: 'splitAmount', + // }, + // { + // label: vm.$t('message.po_Location'), + // key: 'location', + // }, + // { + // label: '物料详情', + // key: 'materialDesc', + // }, + // { + // label: '收货数量', + // key: 'receiptAmount', + // }, + // { + // label: '发货数量', + // key: 'requestAmount', + // }, + // { + // label: '过账信息', + // key: 'accountingMessage', + // }, + // { + // label: '应', + // key: 'y', + // }, + // { + // label: '过账状态', + // key: 'accountingStatus', + // }, + // { + // label: '采购订单号', + // key: 'poNo', + // }, + // { + // label: '行号', + // key: 'poLine', + // }, + // { + // label: '单位', + // key: 'dw', + // }, + // { + // label: 'sap库存地点', + // key: 'kw', + // }, + // { + // label: 'ID', + // key: 'rawOrderInId', + // }, + // { + // label: '工厂', + // key: 'factoryCodeSap', + // }, + // { + // label: '质检状态', + // key: 'qualityStatus', + // }, + // { + // label: '供应商', + // key: 'supplyCode', + // }, + // { + // label: '采购组', + // key: 'buyerGroup', + // }, + // { + // label: '工位', + // key: 'sendSpot', + // }, + // { + // label: 'mrp', + // key: 'mrpCode', + // }, +]; +export const ImportPOReceiveListHeaders = [ + { + label: vm.$t('message.po_OddNumbers'), + key: 'poNo', //po单号 + width: 350, + }, + { + label: vm.$t('message.Line'), + key: 'poLine', //行项目 + // width: 350, + }, + { + label: vm.$t('message.Pi_materielNo'), + key: 'materialCode', //物料号 + width: 350, + }, + { + label: vm.$t('message.CommissionedMaterielDesc'), + key: 'materialDesc', //物料描述 + width: 450, + }, + { + label: vm.$t('message.po_DemandQuantity'), + key: 'poAmount', //需求数量 + }, + { + label: vm.$t('message.Pi_unit'), + key: 'unit', //单位 + }, +]; +export const containerListHeaders = [ + { + label: vm.$t('message.Container'), + key: 'palletCode', //容器码 + width: 300, + }, + { + label: vm.$t('message.po_OddNumbers'), + key: 'poNo', //po单号 + width: 350, + }, + { + label: vm.$t('message.Line'), + key: 'poLine', //行项目 + // width: 350, + }, + { + label: vm.$t('message.Pi_materielNo'), + key: 'materialCode', //物料号 + width: 350, + }, + { + label: vm.$t('message.CommissionedMaterielDesc'), + key: 'materialDesc', //物料描述 + width: 450, + }, + { + label: vm.$t('message.po_DemandQuantity'), + key: 'poAmount', //需求数量 + }, + { + label: vm.$t('message.Pi_unit'), + key: 'unit', //单位 + }, +]; diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/detail-ex.vue b/src/pages/raw/ingoods/RUS-dnReceipt/detail-ex.vue new file mode 100644 index 0000000..fa8dc80 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/detail-ex.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/detail.vue b/src/pages/raw/ingoods/RUS-dnReceipt/detail.vue new file mode 100644 index 0000000..64fb224 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/detail.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/RUS-dnReceipt/dnReceiving.vue new file mode 100644 index 0000000..ff4d8aa --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/dnReceiving.vue @@ -0,0 +1,772 @@ + + + diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/idetailed.vue b/src/pages/raw/ingoods/RUS-dnReceipt/idetailed.vue new file mode 100644 index 0000000..d67f9e7 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/idetailed.vue @@ -0,0 +1,369 @@ + + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/index.vue b/src/pages/raw/ingoods/RUS-dnReceipt/index.vue new file mode 100644 index 0000000..88b6feb --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/index.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/model.location.ts b/src/pages/raw/ingoods/RUS-dnReceipt/model.location.ts new file mode 100644 index 0000000..3567051 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/model.location.ts @@ -0,0 +1,107 @@ +/* + * @Author: zhou lei + * @Date: 2021-12-24 12:02:31 + * @LastEditTime: 2021-12-24 14:33:54 + * @LastEditors: zhou lei + * @Description: + * @FilePath: /wms_haiwai_app/src/pages/raw/ingoods/dnReceipt/model.location.ts + * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司 + */ +/** + * 库位类型 + * @export + * @interface LocationDetail + */ +export default interface LocationDetail { + factoryCode?: string; + cosmoType?: null; + sapFactoryCode?: null; + user?: null; + loginName?: null; + sign?: null; + page?: number; + rows?: number; + schema?: null; + lastModifiedBy?: null; + gmtCreate?: null; + createdBy?: null; + createdByName?: null; + warehouseCode?: string; + warehouseName?: null; + warehouseType?: string; + workareaCode?: null; + createdDate?: null; + createdDateStr?: null; + createdDateMax?: null; + createdDateMaxStr?: null; + createdDateMin?: null; + createdDateMinStr?: null; + lastUpdBy?: null; + lastUpdByName?: null; + lastUpdDate?: null; + lastUpdDateStr?: null; + lastUpdDateMax?: null; + lastUpdDateMin?: null; + activeFlag?: string; + userDefined1?: null; + userDefined2?: null; + userDefined3?: null; + userDefined4?: null; + userDefined5?: null; + userDefined6?: null; + userDefined7?: null; + userDefined8?: null; + userDefined9?: null; + userDefined10?: null; + remark?: null; + createBy?: null; + gmtCreateMin?: null; + gmtCreateStr?: null; + gmtCreateMax?: null; + gmtModified?: null; + gmtModifiedStr?: null; + gmtModifiedMax?: null; + gmtModifiedMin?: null; + locationId?: null; + locationCode?: string; + shelfOrder?: null; + sendSpot?: string; + sendSpotDesc1?: string; + checkOrder?: null; + pickOrder?: null; + locationUse?: null; + pickFlag?: null; + isOpenKnFlag?: null; + locationType?: null; + locationAttr?: null; + turnDemand?: null; + stockEnv?: null; + regionCode?: string; + areaCode?: string; + checkCode?: null; + workArea?: string; + port1?: null; + port2?: null; + port3?: null; + volumeLimit?: null; + weightLimit?: null; + boxLimit?: null; + qtyLimit?: null; + palletLimit?: null; + length?: null; + width?: null; + height?: null; + xcoordinate?: null; + ycoordinate?: null; + zcoordinate?: null; + xpixels?: null; + ypixels?: null; + zpixels?: null; + locRow?: null; + layerNum?: null; + locColumn?: null; + bord?: null; + productMix?: null; + batchMix?: null; + ignoreId?: null; +} diff --git a/src/pages/raw/ingoods/RUS-dnReceipt/model.ts b/src/pages/raw/ingoods/RUS-dnReceipt/model.ts new file mode 100644 index 0000000..696d5bd --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReceipt/model.ts @@ -0,0 +1,303 @@ +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 LocationDetail from './model.location'; +class OrderInInfo { + checked?: boolean; + dnNo?: string; + kw?: string; + userDefined10?: string; + orderStatus?: string; + carNo?: string; + bookingTime?: string; + supplyCode?: string; + poType?: string; + location?: string; + SubmitCode?: string; +} + +@Module({ + namespaced: true, + dynamic: true, + store, + name: 'raw.ingoods.dnReceipt', +}) +export class ReceiptModule extends VuexModule { + // 容器码 + ContainerCode: any = ''; + sendSpot = ''; + /** + * sap库存地点列表 + */ + cboPlaceList = []; + /** + * 隐藏看单号 + */ + SubmitCode: any = ''; + dnNo = ''; + code = ''; + DNdetailedList: any; + ImportDNReceivingList: any = []; + //俄罗斯PO收货返回列表 + ImportPOReceiveList: any = []; + containerList: any = []; + /** + * 看单号查询结果 + */ + orderInInfo: OrderInInfo = new OrderInInfo(); + /** + * 看单明细 + */ + orderInInfoList: OrderInInfo[] = []; + /** + * 看单明细未通过明细 + */ + orderInInfoListEx: OrderInInfo[] = []; + + /** + * 库位列表 + */ + returningTypeList: any[] = []; + + /** + * 是否已查询看单号 + */ + get hasDnInfo() { + return !!this.orderInInfo.dnNo; + } + + /** + * 是否全选 + */ + get isCheckedAll() { + return !this.orderInInfoList.filter((_) => !_.checked).length; + } + + /** + * 是否有选择项 + */ + get hasChecked() { + return this.orderInInfoList.filter((_) => _.checked).length > 0; + } + + /** + * 更新看单明细库位 + * @param kw 库位 + */ + @Mutation + updateOrderInInfoListKw(kw: string) { + this.orderInInfoList = this.orderInInfoList.map((item) => { + item.kw = kw; + return item; + }); + } + + /** + * 更新选中的看单明细库位 + * @param kw 库位 + */ + @Mutation + updateCheckedOrderInInfoListKw(kw: string) { + this.orderInInfoList = this.orderInInfoList.map((item) => { + if (item.checked) { + item.kw = kw; + } + return item; + }); + } + + /** + * 看单明细全选/全不选 + */ + @Mutation + checkAllOrderInInfoList(checked: boolean) { + this.orderInInfoList = this.orderInInfoList.map((item) => { + item.checked = checked; + return item; + }); + } + + /** + * 查询库位列表 + */ + @MutationAction + async queryLocation() { + const result: any = await http.post(url.auth.query.location1, { + factoryCode: session.factoryCode, + loginName: session.loginName, + userDefined3: 1, + }); + console.log('result', result); + const cboPlaceList = result.data.records.map((_: any) => ({ + label: _.sendSpot, + value: _.sendSpot, + })); + return { cboPlaceList }; + } + + /** + * 查询单号 + * 查询DN单号 + * @param dnNo + */ + @MutationAction + async queryOrderInInfo(dnNo: string) { + const { list, code }: any = await http.post(url.material.DNorderin.info, { + dnNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const orderInInfo = list[0] || {}; + const orderInInfoList = list.filter((_: OrderInInfo) => _.userDefined10 === '1'); + const orderInInfoListEx = list.filter((_: OrderInInfo) => _.userDefined10 === '0'); + // orderInInfoList.forEach((item: any) => { + // item.receiptAmount = item.requestAmount; + // }); + uni.setStorageSync('list', JSON.stringify(list) as any); + uni.setStorageSync('sendSpot', JSON.stringify(list[0].sendSpot) as any); + return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx, code }; + } + //海外DN 根据单号查询物料 + @MutationAction + async ImportQueryOrderInfo(dnNo: string) { + const { list, code }: any = await http.post(url.material.DNorderin.ImportInfo, { + dnNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const orderInInfo = list[0] || {}; + const orderInInfoList = list.filter((_: OrderInInfo) => _.userDefined10 === '1'); + const orderInInfoListEx = list.filter((_: OrderInInfo) => _.userDefined10 === '0'); + // orderInInfoList.forEach((item: any) => { + // item.receiptAmount = item.requestAmount; + // }); + uni.setStorageSync('list', JSON.stringify(list) as any); + uni.setStorageSync('sendSpot', JSON.stringify(list[0].sendSpot) as any); + return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx, code }; + } + /** + * 提交看单明细 + */ + @MutationAction + async submitOrderInEnter(list: any) { + // const list = (this.state as any).orderInInfoList.map((item: any) => { + // // item.orderStatus = item.checked ? "2" : "1"; + // return item; + // }); + const result: any = await http.post(url.material.DNorderin.enterRussia, { + dnNo: this.dnNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + list, + }); + uni.showToast({ + icon: 'none', + title: result.msg, + }); + const SubmitCode = result.code; + const orderInInfoList = result.list.sort((a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus)); + return { orderInInfoList, SubmitCode }; + } + //海外DN提交 + @MutationAction + async submitImportOrder(list: any) { + // const list = (this.state as any).orderInInfoList.map((item: any) => { + // // item.orderStatus = item.checked ? "2" : "1"; + // return item; + // }); + const result: any = await http.post(url.material.DNorderin.ImportEnter, { + dnNo: this.dnNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + list, + }); + uni.showToast({ + icon: 'none', + title: result.msg, + }); + const orderInInfoList = result.list.sort((a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus)); + return { orderInInfoList }; + } + /** + * 修改库位 + */ + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async changeOrderInLocation(kw: string) { + await http.post('/wmspda/material/orderin/enter', { + warehouseCode: session.warehouseCode, + factoryCode: session.factoryCode, + loginName: session.loginName, + locationCode: kw, + }); + return kw; + } + /** + * 库位查询 + * + * @param {*} content + * @returns + * @memberof ReceiptModule + */ + @Action({ commit: 'updateCheckedOrderInInfo' }) + async queryByFactoryCodeAndWorkAreaCode(content: any) { + const res = await http.post('wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); + return res; + } + //查询DN/海外DN收货明细 + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async querydetaildlist(content: any) { + const res: any = await http.post('/wmspda/material/getDnRecSn', content); + console.log('明细》》》》》》》》》', res.list); + this.DNdetailedList = res.list; + return res; + } + //俄罗斯 海外PO收货 + @MutationAction + async ImportPOReceive(containerCode: string) { + const res: any = await http.post(url.material.DNorderin.russia, { + containerCode, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const ImportPOReceiveList = res.list; + const containerList = res.containerList; + const code = res.code; + return { ImportPOReceiveList, containerList, code }; + } + //俄罗斯海外PO收货 页面初始化 清空数据 + @MutationAction + async empty() { + const ImportPOReceiveList = []; + const containerList = []; + return { ImportPOReceiveList, containerList }; + } + //俄罗斯海外PO收货 提交数据 + @MutationAction + async containerListSubmit(params: any) { + const res: any = await http.post(url.material.DNorderin.enterrussia, { + wlCode: params.wlCode, + containerCode: params.containerCode, + factoryCode: session.factoryCode, + loginName: session.loginName, + list: params.list, + }); + const code = res.code; + return { code }; + } + //俄罗斯扫描容器码 + @MutationAction + async searchBarcode(params: any) { + const res: any = await http.post(url.auth.query.barcode, { + factoryCode: session.factoryCode, + loginName: session.loginName, + barcode: params.barcode, + productCode: params.productCode, + }); + const ContainerCode = res.data; + return { ContainerCode }; + } +} + +export default getModule(ReceiptModule); diff --git a/src/utils/url.ts b/src/utils/url.ts index dba857b..0540a3d 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -70,6 +70,7 @@ export const url = { dnReturnInfo: '/wmspda/material/orderin/dnReturnInfo', queryOrder: '/wmspda/material/poReturn/queryOrder', //dn退货 单号查询 enter: '/wmspda/material/orderin/enter', + enterRussia: '/wmspda/material/orderin/enter/russia', subcDnEnter: '/wmspda/material/orderin/subcDnEnter', ImportEnter: '/wmspda/material/orderin/overseasDnEnter', subcDnEnterRussia: '/wmspda/material/orderin/subcDnEnter/russia',