diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 9ff176a..2826d1b 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -555,5 +555,6 @@ export default { Reasoncode: '原因编码', Reasonname: '原因名称', responsiblepersonname: '责任人名称', + Linesideinventory: '线边库盘点', }, }; diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 11203d5..c38a38a 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -554,5 +554,6 @@ export default { Reasoncode: 'Reason code', Reasonname: 'Reason name', responsiblepersonname: 'Name of responsible person', + Linesideinventory: 'Line side inventory', }, }; diff --git a/src/i18n/lang/ru.ts b/src/i18n/lang/ru.ts index 8cb40e7..8536dd4 100644 --- a/src/i18n/lang/ru.ts +++ b/src/i18n/lang/ru.ts @@ -554,5 +554,6 @@ export default { Reasoncode: 'Код причины', Reasonname: 'Причина называется', responsiblepersonname: 'Имя ответственного лица', + Linesideinventory: 'инвентаризация бокового хранилища', }, }; diff --git a/src/pages.json b/src/pages.json index 53e761a..861359d 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1439,6 +1439,14 @@ "navigationStyle": "custom", // 隐藏系统导航栏 "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } + }, + { + "path": "pages/raw/LineSide/LineSide-inventory/index", + "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 77f7afc..d128bad 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.32'; + this.Version = '1.1.33'; } else { this.Version = '1.0.49'; } diff --git a/src/pages/raw/LineSide/LineSide-inventory/index.vue b/src/pages/raw/LineSide/LineSide-inventory/index.vue new file mode 100644 index 0000000..ccd3d0f --- /dev/null +++ b/src/pages/raw/LineSide/LineSide-inventory/index.vue @@ -0,0 +1,310 @@ + + + + + diff --git a/src/pages/raw/LineSide/LineSide-inventory/model.ts b/src/pages/raw/LineSide/LineSide-inventory/model.ts new file mode 100644 index 0000000..7136fcf --- /dev/null +++ b/src/pages/raw/LineSide/LineSide-inventory/model.ts @@ -0,0 +1,338 @@ +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.dnReceipt', +}) +export class ReceiptModule extends VuexModule { + // 是否有 + isState = true; + sendSpot = ''; + code: any = ''; + /** + * sap库存地点列表 + */ + cboPlaceList = []; + /** + * 隐藏看单号 + */ + dnNo = ''; + /** + * 看单号查询结果 + */ + orderInInfo: OrderInInfo = new OrderInInfo(); + /** + * 看单明细 + */ + orderInInfoList: OrderInInfo[] = []; + /** + * 看单明细未通过明细 + */ + orderInInfoListEx: OrderInInfo[] = []; + InventoryList: any = []; + InventoryItemList: any = []; + Semifedcode: any = ''; + scandata: any = {}; + SubmitCode: any = ''; + + /** + * 库位列表 + */ + 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 }: 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('sendSpot', JSON.stringify(list[0].sendSpot) as any); + return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx }; + } + + /** + * 查询单号 + * 查询盘点单号 + * @param pddNo + */ + @MutationAction + async rawMaterialInventoryCheckRaw(pddNo: string) { + const res: any = await http.post(url.material.rawMaterialInventory.checkRaw, { + pddNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const InventoryList = res.data; + const InventoryItemList = []; + InventoryList.forEach((item: any) => { + const arr = { + value: item.productCode, + label: item.productCode, + }; + InventoryItemList.push(arr); + }); + return { InventoryList, InventoryItemList }; + // uni.showToast({ + // icon: "none", + // title: msg, + // }); + } + /** + * 查询条码 + * 查询盘点条码 + * @param barcode + */ + @MutationAction + async getRawStorageSnNew(barcode: string) { + const res: any = await http.post(url.material.rawMaterialInventory.barcodeScanPd, { + barcode, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const Semifedcode = res.code; + const scandata = res.data; + // const InventoryItemList = []; + // InventoryList.forEach((item: any) => { + // const arr = { + // value: item.productCode, + // label: item.productCode, + // }; + // InventoryItemList.push(arr); + // }); + return { Semifedcode, scandata }; + // uni.showToast({ + // icon: "none", + // title: msg, + // }); + } + + /** + * 扫描物料号检查 + * + * @param {string} productCode + * @param {string} pddNo + * @memberof ReceiptModule + */ + @Action + async checkRawProductCode(form: any) { + const { code, msg }: any = await http.post(url.material.rawMaterialInventory.productCode, { + productCode: form.productCode, + pddNo: form.pddNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + uni.showToast({ + icon: 'none', + title: msg, + }); + console.log('code:::', code, msg); + const isState = !!+code; + return { isState }; + } + /** + * 新增单号、物料信息 + * + * @param {string} productCode + * @param {string} pddNo + * @memberof ReceiptModule + */ + @Action + async checkRawCreateInfo(form: any) { + const { msg }: any = await http.post(url.material.rawMaterialInventory.createInfo, { + ...form, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + uni.showToast({ + icon: 'none', + title: msg, + }); + } + + /** + * 物料盘点确定 + * + * @param {string} productCode + * @param {string} pddNo + * @memberof ReceiptModule + */ + @MutationAction + async barcodeConfirm(form: any) { + const res: any = await http.post(url.material.rawMaterialInventory.barcodeConfirm, { + ...form, + // factoryCode: session.factoryCode, + // loginName: session.loginName, + }); + const code = res.code; + return { code }; + } + + /** + * 物料盘点完成 + * + * @param {string} productCode + * @param {string} pddNo + * @memberof ReceiptModule + */ + @MutationAction + async checkRawOrderComplete(pddNo?: string | null) { + const res: any = await http.post(url.material.rawMaterialInventory.orderComplete, { + pddNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const code = res.code; + return { code }; + } + + /** + * 提交看单明细 + */ + @MutationAction + async submitOrderInEnter() { + 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.enter, { + 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; + } +} + +export default getModule(ReceiptModule); diff --git a/src/utils/url.ts b/src/utils/url.ts index 7907511..ed47cb9 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -107,6 +107,7 @@ export const url = { orderComplete: '/wmspda/product/finished/checkRaw/orderComplete', getRawStorageSnNew: '/wmspda/material/getRawStorageSnNew', barcodeConfirm: '/wmspda/product/finished/sfgPd/barcodeConfirm', + barcodeScanPd: '/wmspda/material/barcodeScanPd', }, // 委外 commission commission: {