diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 1e93ce2..db4a262 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -317,9 +317,11 @@ export default { product_item3: '半成品空调/洗衣机下线', product_item4: '半成品门体上线', product_item5: '半成品箱体上线', + LocationInventory: '库位盘点', //成品下线 product_Location: '库位', + LocationScanned: '库位已扫', product_barCode: '条码', barcode: '请输入条码', product_TransferCar: '周转车', @@ -352,6 +354,7 @@ export default { product_unit5: '箱', product_unit6: '其他', product_unit7: '请输入物料条码', + code: '盘点单号', //成品空调/洗衣机下线 //半成品门体上线 //半成品箱体上线 diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 41529a4..f402f62 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -275,9 +275,12 @@ export default { //移库 Warehouse_QueryCriteria: 'Query criteria', Warehouse_TransferOrderNo: 'Transfer order No', + LocationInventory: 'Location inventory', Warehouse_TransferDetails: 'Transfer detail', Warehouse_OrderNo: 'Order No', + LocationScanned: 'Location scanned', Warehouse_OriginalLocation: 'Original Loc', + code: 'code', Warehouse_TargetLocation: 'Target Loc', Warehouse_Tip: 'Please input the transfer order No', transfer_barcode: 'Library transfer barcode', diff --git a/src/pages.json b/src/pages.json index c3a33dc..dff19dd 100644 --- a/src/pages.json +++ b/src/pages.json @@ -33,6 +33,14 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/product/warehouse/LocationInventory/index", + "style": { + "navigationBarTitleText": "库位盘点", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/product/outbound/index", "style": { diff --git a/src/pages/product/warehouse/LocationInventory/index.vue b/src/pages/product/warehouse/LocationInventory/index.vue index e69de29..2dd349e 100644 --- a/src/pages/product/warehouse/LocationInventory/index.vue +++ b/src/pages/product/warehouse/LocationInventory/index.vue @@ -0,0 +1,304 @@ + + + diff --git a/src/pages/product/warehouse/LocationInventory/model.ts b/src/pages/product/warehouse/LocationInventory/model.ts index e69de29..33465ef 100644 --- a/src/pages/product/warehouse/LocationInventory/model.ts +++ b/src/pages/product/warehouse/LocationInventory/model.ts @@ -0,0 +1,90 @@ +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 { page } from '@/utils/page'; +import vm from '@/main'; + +class OrderInInfo { + productDescZh?: string; + qty?: string; + custCode?: string; + custCodeName?: string; + productCode?: string; + locCode?: string; + costCenter?: string; +} + +@Module({ + namespaced: true, + dynamic: true, + store, + name: 'product.warehouse.wholeCollect', +}) +export class wholeCollect extends VuexModule { + WlList = []; + code: any = ''; + recordsList: any = []; + choiceCodeList: any = []; + dnNo = ''; + orderInInfo: OrderInInfo = new OrderInInfo(); + modelList: any = []; + status: any = ''; + + @MutationAction + async queryLocation() { + const result: any = await http.get(url.warehouse.wholeTransfer.list, { + params: { + factoryCode: session.factoryCode, + loginName: session.loginName, + }, + }); + // console.log('库位数据',result) + const WlList = result.data.map((_: any) => ({ + label: _.locationCode, + value: _.locationCode, + })); + return { WlList }; + } + + @MutationAction + async queryScrapList(param: any) { + const res: any = await http.post(url.warehouse.LocationInventory.list, param); + const code = res.code; + const modelList = res.data; + return { code, modelList }; + } + /** + * 查询单号 + * 查询DN单号 + * @param dnNo + */ + @MutationAction + async getProductCode(params: any) { + const res: any = await http.post(url.warehouse.LocationInventory.content, params); + const code = res.code; + console.log('resssss', res); + return { code }; + } + + @MutationAction + async onTakeoutConfirm(params: any) { + const records: any = await http.post(url.warehouse.LocationInventory.commit, params); + const status = records.data.status; + return { status }; + } + + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async changeOrderInLocation(kw: string) { + await http.post('/wmspda/material/orderin/enter', { + loginName: session.loginName, + warehouseCode: '', + factoryCode: session.factoryCode, + locationCode: kw, + }); + return kw; + } +} + +export default getModule(wholeCollect); diff --git a/src/pages/product/warehouse/MaterialInventory/index.vue b/src/pages/product/warehouse/MaterialInventory/index.vue index 189981e..c96b9e3 100644 --- a/src/pages/product/warehouse/MaterialInventory/index.vue +++ b/src/pages/product/warehouse/MaterialInventory/index.vue @@ -11,7 +11,7 @@ - {{ $t('message.InventoryNumber') }} + {{ $t('message.code') }} @@ -123,6 +123,7 @@ export default class ProductCheckReceipt extends BasePage { this.total = num; this.areaCode = this.model.modelList[0].areaCode; this.Some = this.model.modelList[0]; + this.wl = this.codeList[0]; } } //选择成品编码 @@ -142,6 +143,12 @@ export default class ProductCheckReceipt extends BasePage { title: this.$t('message.scrapForm') as string, }); } + if (!this.form.barcode) { + uni.showToast({ + icon: 'none', + title: this.$t('message.barcode') as string, + }); + } let params = { factoryCode: session.factoryCode, user: session.loginName, @@ -162,9 +169,10 @@ export default class ProductCheckReceipt extends BasePage { title: this.$t('message.product_Tip8') as string, }); this.total += 1; - this.model.modelList.forEach((item: any, index: any) => { + this.model.modelList.forEach((item: any) => { if (item.productCode == this.wl.value) { - this.model.modelList[index].spQty += 1; + item.spQty += 1; + this.Some = item; } }); this.form.barcode = ''; @@ -301,8 +309,5 @@ export default class ProductCheckReceipt extends BasePage { box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2); padding: 20rpx; } - - .button-bar { - } } diff --git a/src/pages/product/warehouse/wholeTransfer/Local-details.vue b/src/pages/product/warehouse/wholeTransfer/Local-details.vue index d2ebbfd..ec31dda 100644 --- a/src/pages/product/warehouse/wholeTransfer/Local-details.vue +++ b/src/pages/product/warehouse/wholeTransfer/Local-details.vue @@ -9,7 +9,7 @@ - + {{ $t('message.Query') }} @@ -33,7 +33,7 @@ export default class RawReceiptDetail extends BasePage { this.generate(); } async generate() { - if (model.userDefined4 == '') { + if (model.userDefined == '') { uni.showToast({ icon: 'none', title: this.$t('message._tips6') as any, @@ -43,7 +43,7 @@ export default class RawReceiptDetail extends BasePage { let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let content = { loginName: person.session.user.loginName, - cpRef4: model.userDefined4, + cpRef4: model.userDefined, }; await this.model.querydetaildlist(content); let arr = this.model.detailedList; diff --git a/src/pages/product/warehouse/wholeTransfer/index.vue b/src/pages/product/warehouse/wholeTransfer/index.vue index 1cb685c..8d73b87 100644 --- a/src/pages/product/warehouse/wholeTransfer/index.vue +++ b/src/pages/product/warehouse/wholeTransfer/index.vue @@ -10,7 +10,7 @@ - + {{ $t('message.generate') }} @@ -131,7 +131,7 @@ export default class productCheckReceipt extends BasePage { onSubmit() { this.$form.validate(async (valid: boolean) => { if (!valid) return; - if (model.userDefined4 == ' ' || model.userDefined4.length == 0) { + if (model.userDefined == ' ' || model.userDefined.length == 0) { uni.showToast({ icon: 'none', title: this.$t('message.LibraryCode') as string, @@ -169,7 +169,7 @@ export default class productCheckReceipt extends BasePage { orderType: '0', keepBy: session.loginName as string, factoryCode: session.factoryCode as string, - userDefined4: model.userDefined4, + userDefined4: model.userDefined, }, ]; await this.model.onTakeoutConfirm(orderlist); diff --git a/src/pages/product/warehouse/wholeTransfer/model.ts b/src/pages/product/warehouse/wholeTransfer/model.ts index dde70b0..798a8bf 100644 --- a/src/pages/product/warehouse/wholeTransfer/model.ts +++ b/src/pages/product/warehouse/wholeTransfer/model.ts @@ -27,7 +27,7 @@ export class wholeTransfer extends VuexModule { * 库位地点列表 */ WlList = []; - userDefined4 = ''; + userDefined: any = ''; detailedList: any; code = ''; /** @@ -108,10 +108,10 @@ export class wholeTransfer extends VuexModule { @MutationAction async empty() { const orderInInfo: any = []; - const userDefined4 = ''; + const userDefined = ''; const WlList = []; const code = ''; - return { orderInInfo, userDefined4, WlList, code }; + return { orderInInfo, userDefined, WlList, code }; } @MutationAction async onTakeoutConfirm(list: any) { @@ -123,8 +123,8 @@ export class wholeTransfer extends VuexModule { @MutationAction async getCpMoveBatchNo(loginName: any) { let res: any = await http.post(url.warehouse.rowTransfer.getCode, loginName); - let userDefined4 = res.data; - return { userDefined4 }; + let userDefined: any = res.data; + return { userDefined }; } //查询明细 @Action({ commit: 'updateCheckedOrderInInfoListKw' }) diff --git a/src/utils/page.ts b/src/utils/page.ts index c9cb1d6..d9a8aeb 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -49,6 +49,9 @@ export const page = { MaterialInventory: { index: '/pages/product/warehouse/MaterialInventory/index', }, + LocationInventory: { + index: '/pages/product/warehouse/LocationInventory/index', + }, wholeLnventory: { index: '/pages/product/warehouse/wholeLnventory/index', }, diff --git a/src/utils/url.ts b/src/utils/url.ts index b29acf1..80d0ee2 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -206,6 +206,11 @@ export const url = { content: '/wmspda/fg/inventoryUploadSn', commit: '/wmspda/fg/completePd', }, + LocationInventory: { + list: '/wmspda/fg/findMaterialByPddNoKw', + content: '/wmspda/fg/inventoryUploadSn', + commit: '/wmspda/fg/completePd', + }, wholeTransfer: { list: '/wmspda/fg/getMdLocation', content: '/wmspda/fg/getMaterialByCode',