From a726f886d0ac26a145cce4ef9542a045ba2b65c0 Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Thu, 16 Jun 2022 17:59:21 +0800 Subject: [PATCH] =?UTF-8?q?cosmoim-852=20fix=20=E6=96=B0=E5=A2=9E=E4=BF=84?= =?UTF-8?q?=E7=BD=97=E6=96=AF=E9=80=80=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 32 + src/pages/login/login/index.vue | 1 + .../handover/RUS-returning/Time-filter.vue | 195 ++++++ .../raw/handover/RUS-returning/config.ts | 41 ++ .../raw/handover/RUS-returning/index.vue | 376 +++++++++++ src/pages/raw/handover/RUS-returning/model.ts | 124 ++++ .../raw/handover/feeding/RUS-Location.vue | 3 +- src/pages/raw/handover/returning/index.vue | 6 +- .../RUS-dnReturnGoods/Local-details.vue | 113 ++++ .../ingoods/RUS-dnReturnGoods/Location.vue | 636 ++++++++++++++++++ .../raw/ingoods/RUS-dnReturnGoods/config.ts | 51 ++ .../ingoods/RUS-dnReturnGoods/detail-ex.vue | 125 ++++ .../raw/ingoods/RUS-dnReturnGoods/detail.vue | 225 +++++++ .../ingoods/RUS-dnReturnGoods/idetailed.vue | 251 +++++++ .../raw/ingoods/RUS-dnReturnGoods/index.vue | 170 +++++ .../raw/ingoods/RUS-dnReturnGoods/model.ts | 227 +++++++ src/store/modules/session.ts | 12 +- src/utils/page.ts | 5 + src/utils/url.ts | 1 + 19 files changed, 2588 insertions(+), 6 deletions(-) create mode 100644 src/pages/raw/handover/RUS-returning/Time-filter.vue create mode 100644 src/pages/raw/handover/RUS-returning/config.ts create mode 100644 src/pages/raw/handover/RUS-returning/index.vue create mode 100644 src/pages/raw/handover/RUS-returning/model.ts create mode 100644 src/pages/raw/ingoods/RUS-dnReturnGoods/Local-details.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReturnGoods/Location.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReturnGoods/config.ts create mode 100644 src/pages/raw/ingoods/RUS-dnReturnGoods/detail-ex.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReturnGoods/detail.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReturnGoods/idetailed.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReturnGoods/index.vue create mode 100644 src/pages/raw/ingoods/RUS-dnReturnGoods/model.ts diff --git a/src/pages.json b/src/pages.json index 5d70d83..99ba264 100644 --- a/src/pages.json +++ b/src/pages.json @@ -522,6 +522,22 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/ingoods/RUS-dnReturnGoods/Location", + "style": { + "navigationBarTitleText": "俄罗斯退货", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/ingoods/RUS-dnReturnGoods/Local-details", + "style": { + "navigationBarTitleText": "俄罗斯退货明细", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/raw/handover/returning/index", "style": { @@ -538,6 +554,22 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/handover/RUS-returning/index", + "style": { + "navigationBarTitleText": "俄罗斯退料", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/RUS-returning/Time-filter", + "style": { + "navigationBarTitleText": "俄罗斯筛选", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/raw/appointment/checkin/list", "style": { diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index 5ca2810..0476f43 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -272,6 +272,7 @@ export default class LoginPage extends BasePage { msg, userId, userName, + password, lang: this.$i18n.locale as Lang, }); uni.showToast({ diff --git a/src/pages/raw/handover/RUS-returning/Time-filter.vue b/src/pages/raw/handover/RUS-returning/Time-filter.vue new file mode 100644 index 0000000..51d893e --- /dev/null +++ b/src/pages/raw/handover/RUS-returning/Time-filter.vue @@ -0,0 +1,195 @@ + + + + diff --git a/src/pages/raw/handover/RUS-returning/config.ts b/src/pages/raw/handover/RUS-returning/config.ts new file mode 100644 index 0000000..4260473 --- /dev/null +++ b/src/pages/raw/handover/RUS-returning/config.ts @@ -0,0 +1,41 @@ +/** + * 看单明细表格列 + */ +import vm from '@/main'; +export const headers = [ + { + label: vm.$t('message.InventoryOrderNo'), + key: 'label', + width: 330, + }, + { + label: vm.$t('message.InventoryMaterielNo'), + key: 'value', + width: 330, + }, + { + label: vm.$t('message.receiveAStation'), + key: 'sendSpot', + width: 216, + }, +]; +export const RUSdetailHeader = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 260, + }, + { + label: vm.$t('message.CommissionedLocation'), + key: 'wlCode', + }, + { + label: vm.$t('message.dn_Number'), + key: 'amount', + }, + { + label: vm.$t('message.Container'), + key: 'barcode', + width: 700, + }, +]; diff --git a/src/pages/raw/handover/RUS-returning/index.vue b/src/pages/raw/handover/RUS-returning/index.vue new file mode 100644 index 0000000..a85ccf6 --- /dev/null +++ b/src/pages/raw/handover/RUS-returning/index.vue @@ -0,0 +1,376 @@ + + + + + diff --git a/src/pages/raw/handover/RUS-returning/model.ts b/src/pages/raw/handover/RUS-returning/model.ts new file mode 100644 index 0000000..4e4dace --- /dev/null +++ b/src/pages/raw/handover/RUS-returning/model.ts @@ -0,0 +1,124 @@ +import { Action, getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators'; +import store from '@/store'; +import http from '@/utils/request'; +import { url } from '@/utils/url'; +import { auth } from '@/store/modules/auth'; +import { session } from '@/store/modules/session'; + +class OrderInInfo { + amount?: any; + sapFactoryCode?: any; + materialCode?: any; + sendSpot?: any; + totalBackAmount?: any; +} + +@Module({ + namespaced: true, + dynamic: true, + store, + name: 'raw.handover.RUSreturning', +}) +export class ReturningModule extends VuexModule { + materielList: any[] = []; + // 容器码 + ContainerCode: any = ''; + /** + * 订单号查询结果 + */ + orderInInfo: OrderInInfo = new OrderInInfo(); + /** + * 查询订单号 + * @param orderNo + */ + @MutationAction + async queryOrderInInfo(prdOrderFrom: string) { + this.materielList = []; + const { data }: any = await http.post(url.material.prdOrder.info, { + prdOrderFrom, + page: '1', + rows: '50', + loginName: session.loginName, + }); + const materielList = data.map((item: any) => ({ + ...item, + label: item.materialCode, + value: item.materialCode, + totalAmount: item.amount, + })); + const orderInInfo = data[0] || {}; + return { orderInInfo, materielList }; + } + //根据时间查询单号列表 + @MutationAction + async queryTimeInInfo(time: any) { + this.materielList = []; + const { data }: any = await http.post(url.material.prdOrder.info, { + requireDateMin: time.requireDateMin, + requireDateMax: time.requireDateMax, + page: '1', + rows: '50', + loginName: session.loginName, + prdOrderFuzzy: time.prdOrderFuzzy, + }); + console.log('qqqqqqqqq', data); + const materielList = data.map((item: any) => ({ + label: item.prdOrder, + value: item.materialCode, + amount: item.amount, + wkposCode: item.wkposCode, + sendSpot: item.sendSpot, + totalBackAmount: item.totalBackAmount, + })); + const orderInInfo = data[0] || {}; + return { orderInInfo, materielList }; + } + /** + * 获取默认的工厂 + */ + @Action + async queryDefaultFactoryCode() { + const values: any = await http.post(url.auth.factory.sap, { + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + return values[0]; + } + + /** + * 退料上传 + */ + @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 http.post(url.tl.uRussia, params); + uni.showToast({ + //icon: "success", + title: 'success', + duration: 2000, + image: '/static/icons/icon-51.png', + }); + } + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async queryByFactoryCodeAndWorkAreaCode(content: any) { + const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); + return res; + } + @MutationAction + async searchBarcode(barcode: any) { + const res: any = await http.post(url.auth.query.barcode, { + factoryCode: session.factoryCode, + loginName: session.loginName, + barcode, + }); + const ContainerCode = res.data; + return { ContainerCode }; + } +} + +export default getModule(ReturningModule); diff --git a/src/pages/raw/handover/feeding/RUS-Location.vue b/src/pages/raw/handover/feeding/RUS-Location.vue index 2f08daf..5231b0a 100644 --- a/src/pages/raw/handover/feeding/RUS-Location.vue +++ b/src/pages/raw/handover/feeding/RUS-Location.vue @@ -390,6 +390,7 @@ export default class RawReceiptDetail extends BasePage { }; this.LocationList.push(arr); this.model.blDetailList[this.someIndex].wlList.push(arr); + console.log(' this.model.blDetailList', this.model.blDetailList); this.qty = ''; this.business(); } @@ -463,7 +464,7 @@ export default class RawReceiptDetail extends BasePage { factoryCode: this.session.factoryCode, loginName: this.session.loginName, }; - await this.model.saveBlDetailUpload(params).then(() => { + await this.model.saveBlDetailSubmit(params).then(() => { this.qty = ''; this.LocationList = []; this.sapSupplyIdList = []; diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue index 52c66fe..e0ee86c 100644 --- a/src/pages/raw/handover/returning/index.vue +++ b/src/pages/raw/handover/returning/index.vue @@ -101,10 +101,8 @@ export default class returningDom extends BasePage { amount: '', rfPwd: null, wkposCode: '', - // tlType: null, // 退料类型code - // tlName: null, // 退料类型name - materialCode: null, // 物料类型code - wlName: '', // 物料类型name + materialCode: null, + wlName: '', wlCode: '' as any, totalBackAmount: '0', }; diff --git a/src/pages/raw/ingoods/RUS-dnReturnGoods/Local-details.vue b/src/pages/raw/ingoods/RUS-dnReturnGoods/Local-details.vue new file mode 100644 index 0000000..7feefce --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReturnGoods/Local-details.vue @@ -0,0 +1,113 @@ + + + diff --git a/src/pages/raw/ingoods/RUS-dnReturnGoods/Location.vue b/src/pages/raw/ingoods/RUS-dnReturnGoods/Location.vue new file mode 100644 index 0000000..9733f2d --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReturnGoods/Location.vue @@ -0,0 +1,636 @@ + + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReturnGoods/config.ts b/src/pages/raw/ingoods/RUS-dnReturnGoods/config.ts new file mode 100644 index 0000000..d6540a5 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReturnGoods/config.ts @@ -0,0 +1,51 @@ +/** + * 看单明细表格列 + */ +import vm from '@/main'; +export const headers = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', //物料号 + width: 204, + }, + { + label: vm.$t('message.Line'), + key: 'poLine', //行项目 + width: 156, + }, + { + label: vm.$t('message.CommissionedLocation'), + key: 'wlCode', //库位 + width: 156, + }, + { + label: vm.$t('message.product_Number'), + key: 'nowAmount', //数量 + width: 156, + }, + // { + // label: vm.$t("message.po_MaterielDes"), + // key: "materialDesc",//物料描述 + // width: 350, + // }, + // { + // label: vm.$t("message.returned"), + // key: "poAmount",//应退货数量 + // }, + // { + // label: vm.$t("message.quantity"), + // key: "receiptAmount",//累计退货数量 + // }, + // { + // label: vm.$t("message.po_Supplier"), + // key: "supplyCode",//供应商 + // }, + // { + // label: vm.$t("message.po_OrderType"), + // key: "poType",//订单类型 + // }, + // { + // label: vm.$t("message.po_Location"), + // key: "wlCode",//库存地点 + // }, +]; diff --git a/src/pages/raw/ingoods/RUS-dnReturnGoods/detail-ex.vue b/src/pages/raw/ingoods/RUS-dnReturnGoods/detail-ex.vue new file mode 100644 index 0000000..fa8dc80 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReturnGoods/detail-ex.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReturnGoods/detail.vue b/src/pages/raw/ingoods/RUS-dnReturnGoods/detail.vue new file mode 100644 index 0000000..9a3e2b4 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReturnGoods/detail.vue @@ -0,0 +1,225 @@ + + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReturnGoods/idetailed.vue b/src/pages/raw/ingoods/RUS-dnReturnGoods/idetailed.vue new file mode 100644 index 0000000..2bc47d4 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReturnGoods/idetailed.vue @@ -0,0 +1,251 @@ + + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReturnGoods/index.vue b/src/pages/raw/ingoods/RUS-dnReturnGoods/index.vue new file mode 100644 index 0000000..f8dd177 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReturnGoods/index.vue @@ -0,0 +1,170 @@ + + + + + diff --git a/src/pages/raw/ingoods/RUS-dnReturnGoods/model.ts b/src/pages/raw/ingoods/RUS-dnReturnGoods/model.ts new file mode 100644 index 0000000..5f354d3 --- /dev/null +++ b/src/pages/raw/ingoods/RUS-dnReturnGoods/model.ts @@ -0,0 +1,227 @@ +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'; + +class OrderInInfo { + checked?: boolean; + dnNo?: string; + kw?: string; + userDefined10?: string; + orderStatus?: string; + // carNo?: string; + // bookingTime?: string; + supplyCode?: string; + poType?: string; + location?: string; +} + +@Module({ + namespaced: true, + dynamic: true, + store, + name: 'raw.ingoods.dnReturnGoods', +}) +export class ReceiptModule extends VuexModule { + /** + * sap库存地点列表 + */ + cboPlaceList = []; + /** + * 隐藏看单号 + */ + dnNo = ''; + dnReturnList = []; + code: any = ''; + /** + * 看单号查询结果 + */ + orderInInfo: OrderInInfo = new OrderInInfo(); + detailedList = []; + /** + * 看单明细 + */ + orderInInfoList: OrderInInfo[] = []; + /** + * 看单明细未通过明细 + */ + orderInInfoListEx: OrderInInfo[] = []; + + /** + * 是否已查询看单号 + */ + 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.location, { + factoryCode: session.factoryCode, + loginName: session.loginName, + workareaCode: session.workareaCode, + }); + const cboPlaceList = result.list.map((_: any) => ({ + label: _.locationCode, + value: _.locationCode, + })); + return { cboPlaceList }; + } + + /** + * 查询单号 + * 查询DN单号 + * @param dnNo + */ + @MutationAction + async queryOrderInInfo(dnNo: string) { + const { list }: any = await http.post(url.material.DNorderin.dnReturnInfo, { + 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.returnAmount = item.requestAmount; + }); + console.log('1111111', orderInInfoList); + return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx }; + } + @MutationAction + async queryOrder(poNo: string) { + const res: any = await http.post(url.material.DNorderin.queryOrder, { + poNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const orderInInfoListEx = res.data.filter((_: OrderInInfo) => _.userDefined10 === '0'); + const dnReturnList = res.data; + dnReturnList.forEach((item: any) => { + item.list = []; + }); + const orderInInfo: any = res.data[0] || {}; + const code = res.code; + console.log('orderInInfo', orderInInfo); + return { orderInInfo, orderInInfoListEx, dnReturnList, code }; + } + /** + * 提交看单明细 + */ + @MutationAction + async submitOrderInEnter() { + // const list = (this.state as any).orderInInfoList.map((item: any) => { + // item.orderStatus = item.checked ? '2' : '1'; + // item.requestAmount = item.checked ? item.y : '0'; + // return item; + // }); + const list = (this.state as any).orderInInfoList; + const result: any = await http.post(url.material.DNorderin.out, { + 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; + } + + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async queryByFactoryCodeAndWorkAreaCode(content: any) { + const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); + return res; + } + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async queryByFactory(content: any) { + const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); + return res; + } + @MutationAction + async submit(content: any) { + const res: any = await http.post('/wmspda/material/poReturn/materialComplete', content); + const code = res.code; + return { code }; + } + @MutationAction + async querydetaildlist(content: any) { + const res = await http.post('/wmspda/material/poReturn/info', content); + const detailedList = res.data; + return { detailedList }; + } +} + +export default getModule(ReceiptModule); diff --git a/src/store/modules/session.ts b/src/store/modules/session.ts index 8e74e74..0155dee 100644 --- a/src/store/modules/session.ts +++ b/src/store/modules/session.ts @@ -15,6 +15,7 @@ export interface User { loginName?: string; userName?: string; factoryCode?: string; + password?: string; regionCode?: string; list?: Array; } @@ -42,7 +43,16 @@ class SessionService extends VuexModule { get isUserLoggedIn(): boolean { return this.user !== null; } - + /** + * 当前工作区 + */ + get password(): any { + if (this.user === null) { + return null; + } else { + return this.user.password; + } + } /** * 当前用户ID */ diff --git a/src/utils/page.ts b/src/utils/page.ts index 73c8a83..597276a 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -97,6 +97,7 @@ export const page = { returning: { index: '/pages/raw/handover/returning/index', filter: '/pages/raw/handover/returning/Time-filter', + RUSfilter: '/pages/raw/handover/RUS-returning/Time-filter', }, aggregating: { index: '/pages/raw/handover/aggregating/index', @@ -144,6 +145,10 @@ export const page = { detailEx: '/pages/raw/ingoods/dnReturnGoods/detail-ex', idetailed: '/pages/raw/ingoods/dnReturnGoods/idetailed', }, + RUSdnReturnGoods: { + location: '/pages/raw/ingoods/RUS-dnReturnGoods/Location', + Local: '/pages/raw/ingoods/RUS-dnReturnGoods/Local-details', + }, SpareInboun: { details: '/pages/raw/ingoods/SpareInbound/Inbound/Local-details', }, diff --git a/src/utils/url.ts b/src/utils/url.ts index ff8119d..5b7c4ad 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -263,6 +263,7 @@ export const url = { type: '/wmspda/tl/get/type', }, u: '/wmspda/tl/u', + uRussia: '/wmspda/tl/uRussia', }, virtual: { query: {