guoshuang 4 years ago
commit 835292800c

@ -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: '盘点单号',
//成品空调/洗衣机下线
//半成品门体上线
//半成品箱体上线

@ -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',

@ -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": {

@ -0,0 +1,304 @@
<template>
<view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({ delta: 1 })" />
</view>
<view class="title">{{ $t('message.LocationInventory') }}</view>
<view class="right"></view>
</view>
<u-form class="form" ref="form" :model="form" label-width="180rpx">
<!-- 盘点单号 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.code') }}</view>
<u-search :placeholder="$t('message.Commission_tips1')" v-model="form.pddNo" @search="query" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
</view>
</view>
<!-- 单据已扫 -->
<u-form-item :label="$t('message.DocumentScanned')">
<u-input :disabled="true" v-model="total" placeholder="" />
</u-form-item>
<!-- 库位 -->
<u-form-item :label="$t('message.product_Location')">
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="codeList" />
</u-form-item>
<!-- 库位已扫 -->
<u-form-item :label="$t('message.LocationScanned')">
<u-input v-model="Some.spQty" :disabled="true" placeholder="" />
</u-form-item>
<!-- 条码 -->
<u-form-item :label="$t('message.product_BarCode')">
<u-search :placeholder="$t('message.barcode')" v-model="form.barcode" @search="scanning" :show-action="false"></u-search>
</u-form-item>
</u-form>
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="6">
<u-button type="primary" @click="onSubmit">{{ $t('message.product_Confirm') }}</u-button>
</u-col>
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({ delta: 1 })">{{ $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, VFormRules } from 'vue/types/form';
import model from './model';
import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from '@/store/modules/session';
interface OptionType {
label: string;
value: string;
}
@Component({
components: {
jPicker,
},
})
export default class ProductCheckReceipt extends BasePage {
@Ref('form') readonly $form!: VForm;
model = model;
//
form = {
pddNo: '',
barcode: '',
};
wl: any = {};
Some: any = {};
codeList: any = [];
total: any = '';
areaCode: any = '';
// onReadyonLoad
onReady() {
this.model.orderInInfo.productDescZh = '';
this.model.orderInInfo.productCode = '';
this.model.orderInInfo.qty = '';
this.model.orderInInfo.locCode = '';
this.model.orderInInfo.costCenter = '';
}
//
async query() {
if (!this.form.pddNo) {
uni.showToast({
icon: 'none',
title: this.$t('message.Commission_tips1') as string,
});
return;
}
let param = {
factoryCode: session.factoryCode,
loginName: session.loginName,
pddNo: this.form.pddNo,
};
await this.model.queryScrapList(param);
if (this.model.code == '1') {
uni.showToast({
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
let num = 0;
this.model.modelList.forEach((item: any) => {
num += item.spQty;
let arr: any = {};
arr.label = item.locCode;
arr.value = item.locCode;
this.codeList.push(arr);
});
this.total = num;
this.Some = this.model.modelList[0];
this.wl = this.codeList[0];
}
}
//
materialChoice(e: any) {
this.wl = e.pickerName;
this.model.modelList.forEach((item: any) => {
if (item.locCode == this.wl.value) {
this.Some = item;
}
});
}
//
async scanning() {
if (!this.form.pddNo) {
uni.showToast({
icon: 'none',
title: this.$t('message.Commission_tips1') 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,
pdCd: this.form.pddNo,
regionCode: this.Some.regionCode,
areaCode: this.Some.areaCode,
whCode: this.Some.whCode,
snFlag: '1',
pdMode: '10',
sn: this.form.barcode,
locCode: this.wl.value,
qty: '1',
};
await this.model.getProductCode(params);
if (this.model.code == '1') {
uni.showToast({
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
this.total += 1;
this.model.modelList.forEach((item: any) => {
if (item.locCode == this.wl.value) {
item.spQty += 1;
this.Some = item;
}
});
this.form.barcode = '';
}
}
//
async onSubmit() {
if (this.form.pddNo == '') {
uni.showToast({
icon: 'none',
title: this.$t('message.Warehouse_Tip5') as string,
});
return;
}
if (this.total == '') {
uni.showToast({
icon: 'none',
title: this.$t('message.Warehouse_Tip5') as string,
});
return;
}
if (!this.Some) {
uni.showToast({
icon: 'none',
title: this.$t('message.product_Tip3') as string,
});
return;
}
const params = {
factoryCode: session.factoryCode,
user: session.loginName,
pddno: this.form.pddNo,
regionCode: this.Some.regionCode,
areaCode: this.Some.areaCode,
whCode: this.Some.whCode,
snFlag: '1',
pdMode: '10',
};
await this.model.onTakeoutConfirm(params);
if (this.model.status == 'S') {
uni.showToast({
icon: 'none',
title: this.$t('message.success') as string,
});
this.form.pddNo = '';
this.form.barcode = '';
this.wl = {};
this.Some = {};
this.codeList = [];
this.total = '';
this.areaCode = '';
this.model.modelList = [];
}
}
}
</script>
<style lang="scss" scoped>
.page-product-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 {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 110rpx;
height: 100%;
line-height: 100rpx;
}
}
.single-right {
button {
margin-top: 15rpx;
width: 150rpx;
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;
}
}
</style>

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

@ -11,7 +11,7 @@
<!-- 盘点单号 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.InventoryNumber') }}</view>
<view>{{ $t('message.code') }}</view>
<u-search :placeholder="$t('message.Commission_tips1')" v-model="form.pddNo" @search="query" :show-action="false"></u-search>
</view>
<view class="single-right">
@ -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 {
}
}
</style>

@ -9,7 +9,7 @@
</view>
<u-form class="form" ref="form" style="padding-left: 30px" label-width="180rpx">
<u-form-item :label="$t('message.Transfer')">
<u-input v-model="model.userDefined4" placeholder="" class="Transfer" />
<u-input v-model="model.userDefined" placeholder="" class="Transfer" />
<u-button type="primary" style="height: 60rpx; margin-left: 20rpx" @click="generate">{{ $t('message.Query') }}</u-button>
</u-form-item>
</u-form>
@ -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;

@ -10,7 +10,7 @@
<u-form class="form" ref="form" :model="form" label-width="180rpx">
<!-- 移库码 -->
<u-form-item :label="$t('message.Transfer')">
<u-input v-model="model.userDefined4" placeholder="" class="Transfer" />
<u-input v-model="model.userDefined" placeholder="" class="Transfer" />
<u-button type="primary" style="height: 60rpx; margin-left: 20rpx" @click="generate">{{ $t('message.generate') }}</u-button>
</u-form-item>
<!-- 条码 -->
@ -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);

@ -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' })

@ -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',
},

@ -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',

Loading…
Cancel
Save