From 3c4d1b09e33573f0add5b996edbca7fa471c3112 Mon Sep 17 00:00:00 2001 From: zhoulei Date: Thu, 11 Nov 2021 15:23:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A7=94=E5=A4=96=E5=85=A5=E5=BA=93=E5=92=8C?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/cn.ts | 13 + src/i18n/lang/en.ts | 15 + src/pages.json | 41 ++ src/pages/raw/commission/entrant/config.ts | 21 + src/pages/raw/commission/entrant/detail.vue | 182 ++++++++ src/pages/raw/commission/entrant/index.vue | 447 ++++++++++++++++++++ src/pages/raw/commission/entrant/model.ts | 122 ++++++ src/pages/raw/commission/goOut/config.ts | 21 + src/pages/raw/commission/goOut/detail.vue | 182 ++++++++ src/pages/raw/commission/goOut/index.vue | 418 ++++++++++++++++++ src/pages/raw/commission/goOut/model.ts | 122 ++++++ src/pages/raw/commission/index.vue | 138 ++++++ src/pages/raw/index.vue | 6 + src/pages/raw/ingoods/index.vue | 1 + src/utils/page.ts | 12 +- 15 files changed, 1740 insertions(+), 1 deletion(-) create mode 100644 src/pages/raw/commission/entrant/config.ts create mode 100644 src/pages/raw/commission/entrant/detail.vue create mode 100644 src/pages/raw/commission/entrant/index.vue create mode 100644 src/pages/raw/commission/entrant/model.ts create mode 100644 src/pages/raw/commission/goOut/config.ts create mode 100644 src/pages/raw/commission/goOut/detail.vue create mode 100644 src/pages/raw/commission/goOut/index.vue create mode 100644 src/pages/raw/commission/goOut/model.ts create mode 100644 src/pages/raw/commission/index.vue diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 76d5ccc..035a684 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -201,7 +201,20 @@ export default { InventoryTotalNumber:'盘点总数', InventoryPleaseScan: "请扫描单号", + // 委外-入库 + CommissionEntrant:'委外入库', + CommissionedSingleNumber:'单号', + CommissionedMaterielNo:'物料号', + CommissionedMaterielDesc:'物料描述', + CommissionedDemandData:'需求数据', + CommissionedCumulativeData:'累计数据', + CommissionedLocation:'库位', + CommissionedThisNumber:'本次数量', + CommissionedEntrantDetails:'入库明细', + // 委外-出库 + CommissionGoOut:'委外出库', + CommissionedGoOutDetails:'出库明细', //移库 Warehouse_QueryCriteria: "查询条件", Warehouse_TransferOrderNo: "移库单号", diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 5ea4692..803d39a 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -205,6 +205,21 @@ export default { InventoryTotalNumber:'Total', InventoryPleaseScan: "Please scan No.", + // 委外-入库 + CommissionEntrant:'委外入库', + CommissionedSingleNumber:'单号', + CommissionedMaterielNo:'物料号', + CommissionedMaterielDesc:'物料描述', + CommissionedDemandData:'需求数据', + CommissionedCumulativeData:'累计数据', + CommissionedLocation:'库位', + CommissionedThisNumber:'本次数量', + CommissionedEntrantDetails:'入库明细', + + // 委外-出库 + CommissionGoOut:'委外出库', + CommissionedGoOutDetails:'出库明细', + //移库 Warehouse_QueryCriteria: "Query criteria", Warehouse_TransferOrderNo: "Transfer order No", diff --git a/src/pages.json b/src/pages.json index 01773a8..36e5877 100644 --- a/src/pages.json +++ b/src/pages.json @@ -601,6 +601,47 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/commission/index", + "style": { + "navigationBarTitleText": "委外", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/commission/entrant/index", + "style": { + "navigationBarTitleText": "委外入库", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/commission/entrant/detail", + "style": { + "navigationBarTitleText": "入库明细", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + + "path": "pages/raw/commission/goOut/index", + "style": { + "navigationBarTitleText": "委外出库", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/commission/goOut/detail", + "style": { + "navigationBarTitleText": "出库明细", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/demo/index", "style": { diff --git a/src/pages/raw/commission/entrant/config.ts b/src/pages/raw/commission/entrant/config.ts new file mode 100644 index 0000000..1d45ca0 --- /dev/null +++ b/src/pages/raw/commission/entrant/config.ts @@ -0,0 +1,21 @@ +/** + * 看单明细表格列 + */ +import vm from '@/main'; +export const headers = [ + { + label: vm.$t('message.product_barCode'), + key: 'barcode', + width: 300, + }, + { + label: vm.$t('message.product_FGCode'), + key: 'materialCode', + width: 300, + }, + { + label: vm.$t('message.product_FGDes'), + key: 'materialDesc', + width: 300, + }, +]; diff --git a/src/pages/raw/commission/entrant/detail.vue b/src/pages/raw/commission/entrant/detail.vue new file mode 100644 index 0000000..246b6e3 --- /dev/null +++ b/src/pages/raw/commission/entrant/detail.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue new file mode 100644 index 0000000..2646ac2 --- /dev/null +++ b/src/pages/raw/commission/entrant/index.vue @@ -0,0 +1,447 @@ + + + + + diff --git a/src/pages/raw/commission/entrant/model.ts b/src/pages/raw/commission/entrant/model.ts new file mode 100644 index 0000000..f8d0098 --- /dev/null +++ b/src/pages/raw/commission/entrant/model.ts @@ -0,0 +1,122 @@ +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.stoOutbound', +}) +export class ReturningModule extends VuexModule { + /** + * 月台列表 + */ + returningTypeList: any[] = []; + /** + * 物料列表 + */ + materielList: any[] = []; + + //条码扫描的返回的结果 + oneMaterielDetail: any = {}; + /** + * 订单号查询结果 + */ + orderInInfo: OrderInInfo = new OrderInInfo(); + //记账按钮的code码 + code = ''; + /** + * 查询月台列表 + */ + @MutationAction + async queryReturningTypeList() { + const list: [] = await http.post(url.outbound.stoOutbound.yuetaiType, { + factoryCode: session.factoryCode, + whCode: session.warehouseCode, + loginName: session.loginName, + }); + const returningTypeList = list.map((item: any) => ({ + label: item.dockName, + value: item.dockCode, + })); + return { returningTypeList }; + } + + /** + * 查询订单号 + * @param orderNo + */ + @MutationAction + async queryOrderInInfo(stoNo: string) { + const result = await http.post(url.outbound.stoOutbound.info, { + stoNo, + deleteFlag: 2, + finalState: 3, + loginName: session.loginName, + }); + let stoAmount = 0; + result.data.records.forEach((item: any) => { + stoAmount += item.orderAmount; + }); + const materielList = result.data.records.map((item: any) => ({ + label: item.materialCode, + value: item.stoItem, + ...item, + })); + console.log('materielList', materielList); + if (result.data.records[0]) { + result.data.records[0].stoAmount = stoAmount; + } + const orderInInfo = result.data.records[0] || {}; + return { orderInInfo, materielList }; + } + + /** + * 扫条码 + */ + @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 }; + } +} + +export default getModule(ReturningModule); diff --git a/src/pages/raw/commission/goOut/config.ts b/src/pages/raw/commission/goOut/config.ts new file mode 100644 index 0000000..1d45ca0 --- /dev/null +++ b/src/pages/raw/commission/goOut/config.ts @@ -0,0 +1,21 @@ +/** + * 看单明细表格列 + */ +import vm from '@/main'; +export const headers = [ + { + label: vm.$t('message.product_barCode'), + key: 'barcode', + width: 300, + }, + { + label: vm.$t('message.product_FGCode'), + key: 'materialCode', + width: 300, + }, + { + label: vm.$t('message.product_FGDes'), + key: 'materialDesc', + width: 300, + }, +]; diff --git a/src/pages/raw/commission/goOut/detail.vue b/src/pages/raw/commission/goOut/detail.vue new file mode 100644 index 0000000..f1b6367 --- /dev/null +++ b/src/pages/raw/commission/goOut/detail.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/pages/raw/commission/goOut/index.vue b/src/pages/raw/commission/goOut/index.vue new file mode 100644 index 0000000..2718ce2 --- /dev/null +++ b/src/pages/raw/commission/goOut/index.vue @@ -0,0 +1,418 @@ + + + + + diff --git a/src/pages/raw/commission/goOut/model.ts b/src/pages/raw/commission/goOut/model.ts new file mode 100644 index 0000000..f8d0098 --- /dev/null +++ b/src/pages/raw/commission/goOut/model.ts @@ -0,0 +1,122 @@ +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.stoOutbound', +}) +export class ReturningModule extends VuexModule { + /** + * 月台列表 + */ + returningTypeList: any[] = []; + /** + * 物料列表 + */ + materielList: any[] = []; + + //条码扫描的返回的结果 + oneMaterielDetail: any = {}; + /** + * 订单号查询结果 + */ + orderInInfo: OrderInInfo = new OrderInInfo(); + //记账按钮的code码 + code = ''; + /** + * 查询月台列表 + */ + @MutationAction + async queryReturningTypeList() { + const list: [] = await http.post(url.outbound.stoOutbound.yuetaiType, { + factoryCode: session.factoryCode, + whCode: session.warehouseCode, + loginName: session.loginName, + }); + const returningTypeList = list.map((item: any) => ({ + label: item.dockName, + value: item.dockCode, + })); + return { returningTypeList }; + } + + /** + * 查询订单号 + * @param orderNo + */ + @MutationAction + async queryOrderInInfo(stoNo: string) { + const result = await http.post(url.outbound.stoOutbound.info, { + stoNo, + deleteFlag: 2, + finalState: 3, + loginName: session.loginName, + }); + let stoAmount = 0; + result.data.records.forEach((item: any) => { + stoAmount += item.orderAmount; + }); + const materielList = result.data.records.map((item: any) => ({ + label: item.materialCode, + value: item.stoItem, + ...item, + })); + console.log('materielList', materielList); + if (result.data.records[0]) { + result.data.records[0].stoAmount = stoAmount; + } + const orderInInfo = result.data.records[0] || {}; + return { orderInInfo, materielList }; + } + + /** + * 扫条码 + */ + @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 }; + } +} + +export default getModule(ReturningModule); diff --git a/src/pages/raw/commission/index.vue b/src/pages/raw/commission/index.vue new file mode 100644 index 0000000..7030b4e --- /dev/null +++ b/src/pages/raw/commission/index.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/src/pages/raw/index.vue b/src/pages/raw/index.vue index 5bc2e92..cf6a820 100644 --- a/src/pages/raw/index.vue +++ b/src/pages/raw/index.vue @@ -30,6 +30,12 @@ > + + + + 5.{{ '委外' }} + +