diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 8043fd9..bd16696 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -280,6 +280,7 @@ export default { CommissionedReceiptQuantity: '收货数量', subcontract: '委外', CommissionGoOut: '委外出库', + CommissionReturn: '委外退料', Outbound: '出库库位', Warehousing: '入库库位', PleaseQuantity: '请输入本次数量', diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index eaf04e2..efd3486 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -280,6 +280,7 @@ export default { CommissionedReceiptQuantity: 'Receipt quantity', subcontract: 'Subcontract', CommissionGoOut: 'Subcontracting issue', + CommissionReturn: 'Subcontracting return', Outbound: 'Outbound location', Warehousing: 'Warehouse location', PleaseQuantity: 'Please enter this quantity', diff --git a/src/i18n/lang/ru.ts b/src/i18n/lang/ru.ts index cb665e4..debdd4f 100644 --- a/src/i18n/lang/ru.ts +++ b/src/i18n/lang/ru.ts @@ -276,6 +276,7 @@ export default { CommissionedReceiptQuantity: 'Количество поступления товара', subcontract: 'Аутсорсинг', CommissionGoOut: 'Склад на аутсорсинге', + CommissionReturn: 'Subcontracting return', Outbound: 'Место выхода со склада', Warehousing: 'Место входа на склад', PleaseQuantity: 'Пожалуйста, введите данное количество', diff --git a/src/pages.json b/src/pages.json index 43b58cd..44704d1 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1058,6 +1058,14 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/commission/return/index", + "style": { + "navigationBarTitleText": "委外退料", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/raw/commission/goOut/detail", "style": { diff --git a/src/pages/raw/commission/return/config.ts b/src/pages/raw/commission/return/config.ts new file mode 100644 index 0000000..00022da --- /dev/null +++ b/src/pages/raw/commission/return/config.ts @@ -0,0 +1,58 @@ +/* + * @Author: zhou lei + * @Date: 2021-11-11 11:09:57 + * @LastEditTime: 2021-12-14 10:13:18 + * @LastEditors: zhou lei + * @Description: + * @FilePath: /wms_haiwai_app/src/pages/raw/commission/goOut/config.ts + * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司 + */ +/** + * 看单明细表格列 + */ +import vm from '@/main'; +export const headers = [ + { + label: vm.$t('message.CommissionedSingleNumber'), + key: 'poNo', + width: 200, + }, + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 300, + }, + { + label: vm.$t('message.CommissionedMaterielDesc'), + key: 'materialDesc', + width: 300, + }, + { + label: vm.$t('message.CommissionedGoOutNumber'), + key: 'outAmount', + width: 200, + }, + { + label: vm.$t('message.CommissionedLocation'), + key: 'wlCode', + width: 200, + }, +]; + +export const detailHeader = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 301, + }, + { + label: vm.$t('message.CommissionedLocation'), + key: 'wlCode', + width: 186, + }, + { + label: vm.$t('message.product_Number'), + key: 'nowAmount', + width: 186, + }, +]; diff --git a/src/pages/raw/commission/return/detail.vue b/src/pages/raw/commission/return/detail.vue new file mode 100644 index 0000000..a0e89c3 --- /dev/null +++ b/src/pages/raw/commission/return/detail.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/pages/raw/commission/return/index.vue b/src/pages/raw/commission/return/index.vue new file mode 100644 index 0000000..50a7e8f --- /dev/null +++ b/src/pages/raw/commission/return/index.vue @@ -0,0 +1,510 @@ + + + diff --git a/src/pages/raw/commission/return/model.ts b/src/pages/raw/commission/return/model.ts new file mode 100644 index 0000000..5921c2e --- /dev/null +++ b/src/pages/raw/commission/return/model.ts @@ -0,0 +1,185 @@ +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 { session } from '@/store/modules/session'; +// import vm from '@/main'; + +class OrderInInfo { + stoAmount?: 0; + stoNo?: string; //STO采购单号 + orderAmount?: string; //单据总数 + Allocated?: string; //已分配 + Unallocated?: string; //未分配 +} + +@Module({ + namespaced: true, + dynamic: true, + store, + name: 'product.outbound.stoOut', +}) +export class ReturningModule extends VuexModule { + /** + * 月台列表 + */ + returningTypeList: any[] = []; + detailedList: any; + /** + * 物料列表 + */ + materielList: any[] = []; + locationCodeList: any[] = []; + LocList: any[] = []; + //条码扫描的返回的结果 + oneMaterielDetail: any = {}; + /** + * 订单号查询结果 + */ + orderInInfo: OrderInInfo = new OrderInInfo(); + //记账按钮的code码 + code = ''; + /** + * 委外出库单号查询 + * @param orderNo + */ + @Action + async queryOrder(form: any) { + const result = await http.post(url.material.commission.goOut.queryOrder, { + ...form, + loginName: session.loginName, + factoryCode: session.factoryCode, + }); + const orderInInfo = result.data.records[0] || {}; + return { orderInInfo }; + } + /** + * 库位 + */ + // @MutationAction + // async queryByFactoryCodeAndWorkAreaCode() { + // const list: [] = await http.post(url.material.commission.goOut.queryByFactoryCodeAndWorkAreaCode, { + // factoryCode: session.factoryCode, + // whCode: session.warehouseCode, + // loginName: session.loginName, + // }); + // const locationCodeList = list.map((item: any) => ({ + // label: item.locationCode, + // value: item.locationCode, + // })); + // return { locationCodeList }; + // } + /** + * 获取物料 + * + * @returns + * @memberof ReturningModule + */ + @MutationAction + async outInfo(poNo: string) { + const list: [] = await http.post(url.material.commission.goOut.outInfo, { + factoryCode: session.factoryCode, + poNo: poNo, + loginName: session.loginName, + }); + const locationCodeList = list.map((item: any) => ({ + label: item.locationCode, + value: item.locationCode, + })); + return { locationCodeList }; + } + + /** + * 提交 + */ + @Action + async materialComplete(form: any) { + const res = await http.post(url.material.commission.goOut.materialComplete, { + factoryCode: session.factoryCode, + loginName: session.loginName, + ...form, + }); + console.log(res, '>>>>>res'); + } + + /** + * 扫条码 + */ + @Action + async tluSubmit(list: any[]) { + const obj = { + barcode: list[0].barCode, + loginName: session.loginName, + }; + let oneMaterielDetail: any = {}; + const { data }: any = await http.post(url.outbound.stoOutbound.checkScan, obj); + console.log('shneme a ', data.records); + oneMaterielDetail = data.records[0]; + data.records[0].materialCode = list[0].productCode; + data.records[0].materialDesc = list[0].productDescZh; + console.log('aaaaa', oneMaterielDetail); + return oneMaterielDetail; + } + /** + * 确认按钮 + * @param orderNo + */ + @MutationAction + async confirm(list: any[]) { + const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list); + console.log('res数据', data, code); + // if (code == '1') { + // uni.showToast({ icon: 'success', title: msg }); + // } else { + // uni.showToast({ icon: 'none', title: msg }); + // } + const materielList: any = []; + return { code, materielList }; + } + //委外出库 关闭订单 + @MutationAction + async closeCode(poNo: any) { + const res: any = await http.post(url.outbound.stoOutbound.close, { + poNo, + loginName: session.loginName, + factoryCode: session.factoryCode, + }); + const code: any = res.code; + return { code }; + } + + //委外出库 初始化获取库位 + // @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + @MutationAction + async queryLocList(content: any) { + const res: any = await http.post(url.Subcontract.base.queryLocList, content); + const LocList = res; + return { LocList }; + } + //订单信息查询 + @Action + async querySubcontractInfo(poNo: any) { + const res = await http.post(url.Subcontract.matReturn.queryOrderInfo, { + poNo, + loginName: session.loginName, + factoryCode: session.factoryCode, + }); + return res; + } + //submit + @Action + async submitSubcontractReturn(upload: any) { + const res = await http.post(url.Subcontract.matReturn.submit, upload); + return res; + } + //查询明细 + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async querydetaildlistSubcontractReturn(content: any) { + const res: any = await http.post(url.Subcontract.matReturn.detail, content); + console.log('明细》》》》》》》》》', res.list); + this.detailedList = res.data; + return res; + } +} + +export default getModule(ReturningModule); diff --git a/src/utils/page.ts b/src/utils/page.ts index d12f902..df6d485 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -257,6 +257,10 @@ export const page = { index: '/pages/raw/commission/goOut/index', detail: '/pages/raw/commission/goOut/detail', }, + return: { + index: '/pages/raw/commission/return/index', + detail: '/pages/raw/commission/return/detail', + }, RUSentrant: { index: '/pages/raw/commission/RUS-entrant/index', detail: '/pages/raw/commission/RUS-entrant/detail', diff --git a/src/utils/url.ts b/src/utils/url.ts index c9c2a4a..0914cc5 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -152,6 +152,18 @@ export const url = { }, soInbound: {}, }, + Subcontract: { + base: { + queryLocList: '/wmspda/subcontractRf/queryLocList', + }, + matReturn: { + queryOrderInfo: '/wmspda/subcontractRf/return/queryOrderInfo', + submit: '/wmspda/subcontractRf/return/submit', + detail: '/wmspda/subcontractRf/return/detail', + }, + matOut: {}, + matIn: {}, + }, //出库 outbound: { stoOutbound: {