cosmoim-852 fix 新增俄罗斯线边库盘点

master
guoshuang 2 years ago
parent 91c617b718
commit a354a46aba

@ -555,5 +555,6 @@ export default {
Reasoncode: '原因编码', Reasoncode: '原因编码',
Reasonname: '原因名称', Reasonname: '原因名称',
responsiblepersonname: '责任人名称', responsiblepersonname: '责任人名称',
Linesideinventory: '线边库盘点',
}, },
}; };

@ -554,5 +554,6 @@ export default {
Reasoncode: 'Reason code', Reasoncode: 'Reason code',
Reasonname: 'Reason name', Reasonname: 'Reason name',
responsiblepersonname: 'Name of responsible person', responsiblepersonname: 'Name of responsible person',
Linesideinventory: 'Line side inventory',
}, },
}; };

@ -554,5 +554,6 @@ export default {
Reasoncode: 'Код причины', Reasoncode: 'Код причины',
Reasonname: 'Причина называется', Reasonname: 'Причина называется',
responsiblepersonname: 'Имя ответственного лица', responsiblepersonname: 'Имя ответственного лица',
Linesideinventory: 'инвентаризация бокового хранилища',
}, },
}; };

@ -1439,6 +1439,14 @@
"navigationStyle": "custom", // "navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black- "navigationBarTextStyle": "white" // white-black-
} }
},
{
"path": "pages/raw/LineSide/LineSide-inventory/index",
"style": {
"navigationBarTitleText": "线边库盘点",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
} }
], ],
"globalStyle": { "globalStyle": {

@ -171,7 +171,7 @@ export default class LoginPage extends BasePage {
console.log('......', server.serverAddress); console.log('......', server.serverAddress);
if (server.serverAddress.includes('https://eurmom.haier.net')) { if (server.serverAddress.includes('https://eurmom.haier.net')) {
// //
this.Version = '1.1.32'; this.Version = '1.1.33';
} else { } else {
this.Version = '1.0.49'; this.Version = '1.0.49';
} }

@ -0,0 +1,310 @@
<template>
<view class="page-raw-receipt">
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="back" />
</view>
<view class="title">{{ $t('message.Linesideinventory') }}</view>
<view class="right"></view>
</view>
<u-form class="form" ref="form" :model="productItem" label-width="180rpx">
<!-- 单号 -->
<u-form-item :required="true" :label="$t('message.InventoryOrderNo')" prop="pddNo">
<u-search :placeholder="$t('message.InventoryPleaseScan')" v-model.trim="pddNo" @search="rawMaterialInventoryCheckRaw" :show-action="false"></u-search>
<view class="single-right">
<u-button type="primary" @click="rawMaterialInventoryCheckRaw">{{ $t('message.Query') }}</u-button>
</view>
</u-form-item>
<!-- 已扫总数 -->
<u-form-item :label="$t('message.Total_scanned')" prop="spQty">
<u-input v-model="allNum" placeholder=" " :disabled="true" type="number" />
</u-form-item>
<!-- 条码 -->
<u-form-item :required="true" :label="$t('message.product_barCode')" prop="productCode">
<u-search :placeholder="$t('message.barcode')" :focus="isfocus" v-model.trim="barcode" @search="onSearchBarcode" :show-action="false"></u-search>
</u-form-item>
<!-- 库位 -->
<u-form-item :label="$t('message.CommissionedLocation')" prop="spQty">
<u-input v-model="productItem.locCode" placeholder=" " :disabled="true" type="text" />
</u-form-item>
<!-- 物料号 -->
<u-form-item :label="$t('message.po_MaterielNo')" prop="productDescZh">
<u-input v-model="productItem.productCode" placeholder=" " :disabled="true" type="text" />
</u-form-item>
<!-- <u-form-item :label="$t('message.po_MaterielNo')" prop="productDescZh">
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="onchange" showKey="value" valKey="value" :val="wl.value" class="search" :options="model.InventoryItemList" />
</u-form-item> -->
<!-- 物料名 -->
<u-form-item :label="$t('message.InventoryMateriel')" prop="productDescZh">
<u-input v-model="productItem.productDescZh" placeholder=" " :disabled="true" type="text" />
</u-form-item>
<!-- 物料已扫 -->
<u-form-item :label="$t('message.product_Swept')" prop="productDescZh">
<u-input v-model="productItem.spQty" placeholder=" " :disabled="true" type="number" />
</u-form-item>
<!-- 库存数量 -->
<u-form-item :label="$t('message.dn_Number')" prop="spQty">
<u-input v-model="spQty" :disabled="true" placeholder="" type="number" />
</u-form-item>
</u-form>
<view class="bottom-bar">
<u-row class="button-bar">
<!-- <u-col :span="4">
<u-button type="primary" @click="checkRawCreateInfo">{{ $t('message.workArea_Confirm') }}</u-button>
</u-col> -->
<u-col :span="6">
<u-button type="primary" @click="checkRawOrderComplete">{{ $t('message.InventoryFinish') }}</u-button>
</u-col>
<u-col :span="6">
<u-button type="error" @click="back">{{ $t('message.po_Return') }}</u-button>
</u-col>
</u-row>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import { VForm } from 'vue/types/form';
import model from './model';
import jPicker from '@/components/J-Picker/jPicker.vue';
@Component({
components: {
jPicker,
},
})
export default class rawMaterialInventory extends BasePage {
@Ref('form') readonly $form!: VForm;
model = model;
index() {
this.toPage(this.page.raw.index);
}
pddNo: any = '';
spQty: any = '';
productItem: any = {};
allNum = 0;
originWlSelect = false;
wl: any = {};
barcode: any = '';
scanreturndata: any = {};
isfocus = false;
//
onReady() {
this.empty();
}
empty() {
this.model.orderInInfo.carNo = '';
this.model.orderInInfo.bookingTime = '';
this.model.orderInInfo.supplyCode = '';
this.model.orderInInfo.poType = '';
this.model.orderInInfo.location = '';
this.spQty = '';
this.productItem = {};
this.allNum = 0;
this.scanreturndata = {};
this.barcode = '';
}
//
async rawMaterialInventoryCheckRaw() {
if (!this.pddNo) {
uni.showToast({
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return;
}
await this.model.rawMaterialInventoryCheckRaw(this.pddNo);
if (this.model.InventoryList.length != 0) {
this.allNum = 0;
this.model.InventoryList.forEach((item: any) => {
this.allNum += parseFloat(item.spQty);
});
// this.productItem = this.model.InventoryList[0];
// this.wl = this.model.InventoryItemList[0];
}
this.isfocus = false;
setTimeout(() => {
this.isfocus = true;
}, 0);
}
//
// onchange(e: any) {
// this.model.InventoryList.forEach((item: any) => {
// if (item.productCode == e.pickerName.label) {
// this.productItem = item;
// }
// });
// }
//
async checkRawCreateInfo() {
if (!this.spQty) {
uni.showToast({
icon: 'none',
title: this.$t('message.Summary_PleaseInputNumber') as any,
});
return;
}
if (!this.pddNo) {
uni.showToast({
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return;
}
if (!this.barcode) {
uni.showToast({
icon: 'none',
title: this.$t('message.barcode') as any,
});
return;
}
let params = {
factoryCode: this.session.factoryCode,
loginName: this.session.loginName,
pddNo: this.pddNo,
productStatus: this.model.scandata.productStatus,
productCode: this.productItem.productCode,
locCode: this.productItem.locCode,
barcode: this.barcode,
spQty: this.spQty,
};
await model.barcodeConfirm(params);
if (this.model.code == '1') {
this.empty();
await this.rawMaterialInventoryCheckRaw();
}
}
//
async checkRawOrderComplete() {
uni.showModal({
title: this.$t('message.Closecount') as string,
success: async (res) => {
if (res.confirm) {
await model.checkRawOrderComplete(this.pddNo);
if (this.model.code == '1') {
uni.showToast({ title: this.$t('message.Warehouse_Tip9') as any });
this.empty();
this.pddNo = '';
}
} else if (res.cancel) {
return;
}
},
});
}
//
back() {
uni.navigateBack({ delta: 1 });
}
//
async onSearchBarcode() {
if (this.pddNo == '' || this.pddNo.length == 0) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
if (this.barcode == '' || this.barcode.length == 0) {
this.customToast(this.$t('message.barcode') as string);
return;
}
await this.model.getRawStorageSnNew(this.barcode);
if (this.model.Semifedcode == '1') {
//this.customToast(this.$t('message.Warehouse_Tip9') as string);
// if (JSON.stringify(this.model.InventoryList).indexOf(this.model.Semifedcode) != -1) {
//this.scanreturndata = this.model.scandata;
this.spQty = Number(this.model.scandata.barQty);
this.model.InventoryList.forEach((item: any) => {
if (item.productCode == this.model.scandata.productCode && item.locCode == this.model.scandata.locCode) {
this.productItem = item;
// this.wl = item;
this.productItem.spQty += 1;
}
});
// } else {
// this.customToast(this.$t('message.Nomatch') as string);
// }
// this.barcode = '';
// this.histroyItem = {};
// this.productCodeList = {};
// this.model.empty();
// await this.query();
this.checkRawCreateInfo();
}
}
}
</script>
<style lang="scss" scoped>
.page-raw-receipt {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item {
padding: 30rpx 0;
line-height: 35rpx;
}
}
.single-right {
button {
//margin-top: 15rpx;
width: 110rpx;
height: 70rpx;
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.button-bar {
}
}
</style>

@ -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);

@ -107,6 +107,7 @@ export const url = {
orderComplete: '/wmspda/product/finished/checkRaw/orderComplete', orderComplete: '/wmspda/product/finished/checkRaw/orderComplete',
getRawStorageSnNew: '/wmspda/material/getRawStorageSnNew', getRawStorageSnNew: '/wmspda/material/getRawStorageSnNew',
barcodeConfirm: '/wmspda/product/finished/sfgPd/barcodeConfirm', barcodeConfirm: '/wmspda/product/finished/sfgPd/barcodeConfirm',
barcodeScanPd: '/wmspda/material/barcodeScanPd',
}, },
// 委外 commission // 委外 commission
commission: { commission: {

Loading…
Cancel
Save